- Use separate keys to go to the previous and next strings in
the search/replace history, and display them as "^P" and "^N".
This makes mouse clicks work properly on them. Changes to
- shortcut_init(), help_init(), and do_statusbar_input(). (DLR)
+ shortcut_init(), help_init(), nanogetstr(), and
+ do_statusbar_input(). (DLR)
- files.c:
load_open_file()
- Remove an unneeded clearok(FALSE). (DLR)
IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_LASTLINE_FKEY,
NANO_NO_KEY, VIEW, do_last_line);
- /* Translators: try to keep this string under 12 characters long */
+ /* Translators: try to keep this string under 10 characters long */
sc_init_one(&replace_list, NANO_TOOTHERSEARCH_KEY, N_("No Replace"),
IFHELP(nano_whereis_msg, NANO_NO_KEY), NANO_REPLACE_FKEY,
NANO_NO_KEY, VIEW, NULL);
&s_or_t, &ran_func, &finished, TRUE)) != NANO_CANCEL_KEY &&
kbinput != NANO_ENTER_KEY) {
- /* If we have a shortcut with an associated function, break out
- * if we're finished after running or trying to run the
- * function. */
- if (ran_func && finished)
- break;
-
assert(statusbar_x <= answer_len && answer_len == strlen(answer));
if (kbinput != NANO_TAB_KEY)
answer_len = strlen(answer);
statusbar_x = answer_len;
}
+ finished = FALSE;
}
#ifndef DISABLE_TABCOMP
else
answer = input_tab(answer, &statusbar_x, &tabbed,
list);
answer_len = strlen(answer);
+ finished = FALSE;
}
#endif
break;
free(currentbuf);
currentbuf = NULL;
use_cb = 0;
-
/* Otherwise, get the older search from the history
* list and save it in answer. */
} else if ((history =
answer = mallocstrcpy(answer, history);
answer_len = strlen(history);
}
-
statusbar_x = answer_len;
+ finished = FALSE;
}
#endif
break;
get_history_newer(history_list)) != NULL) {
answer = mallocstrcpy(answer, history);
answer_len = strlen(history);
-
/* If currentbuf isn't NULL and use_cb isn't 2, it
* means that we're scrolling down at the bottom of
* the search history and we need to restore the
free(currentbuf);
currentbuf = NULL;
use_cb = 1;
-
/* Otherwise, if currentbuf is NULL and use_cb isn't
* 2, it means that we're scrolling down at the
* bottom of the search history and we need to save
answer_len = 0;
use_cb = 2;
}
-
statusbar_x = answer_len;
+ finished = FALSE;
}
#endif
break;
}
+ /* If we have a shortcut with an associated function, break out
+ * if we're finished after running or trying to run the
+ * function. */
+ if (finished)
+ break;
+
#ifndef NANO_SMALL
last_kbinput = kbinput;
#endif