Searched refs:history_index (Results 1 – 1 of 1) sorted by relevance
134 int history_index; /* The history index we are currently editing. */ member532 free(history[history_len - 1 - l->history_index]); in linenoiseEditHistoryNext()533 history[history_len - 1 - l->history_index] = strdup(l->buf); in linenoiseEditHistoryNext()535 l->history_index += (dir == LINENOISE_HISTORY_PREV) ? 1 : -1; in linenoiseEditHistoryNext()536 if (l->history_index < 0) { in linenoiseEditHistoryNext()537 l->history_index = 0; in linenoiseEditHistoryNext()539 } else if (l->history_index >= history_len) { in linenoiseEditHistoryNext()540 l->history_index = history_len-1; in linenoiseEditHistoryNext()543 strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen); in linenoiseEditHistoryNext()613 l.history_index = 0; in linenoiseEdit()