Searched refs:history_index (Results 1 – 1 of 1) sorted by relevance
152 int history_index; /* The history index we are currently editing. */ member744 free(history[history_len - 1 - l->history_index]); in linenoiseEditHistoryNext()745 history[history_len - 1 - l->history_index] = strdup(l->buf); in linenoiseEditHistoryNext()747 l->history_index += (dir == LINENOISE_HISTORY_PREV) ? 1 : -1; in linenoiseEditHistoryNext()748 if (l->history_index < 0) { in linenoiseEditHistoryNext()749 l->history_index = 0; in linenoiseEditHistoryNext()751 } else if (l->history_index >= history_len) { in linenoiseEditHistoryNext()752 l->history_index = history_len-1; in linenoiseEditHistoryNext()755 strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen); in linenoiseEditHistoryNext()831 l.history_index = 0; in linenoiseEdit()