Lines Matching refs:history_index
161 int history_index; /* The history index we are currently editing. */
761 free(history[history_len - 1 - l->history_index]);
762 history[history_len - 1 - l->history_index] = strdup(l->buf);
764 l->history_index += (dir == LINENOISE_HISTORY_PREV) ? 1 : -1;
765 if (l->history_index < 0) {
766 l->history_index = 0;
768 } else if (l->history_index >= history_len) {
769 l->history_index = history_len-1;
772 strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen);
841 l.history_index = 0;