Home
last modified time | relevance | path

Searched refs:history_index (Results 1 – 1 of 1) sorted by relevance

/hal_espressif-3.6.0/components/console/linenoise/
Dlinenoise.c152 int history_index; /* The history index we are currently editing. */ member
744 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()