* src/global.c (first_sc_for): Move this too to a better place.
* src/prompt.c (do_yesno_prompt): Use the new and more direct
func_from_key() wrapper instead of get_shortcut().
+ * src/text.c (do_linter): Likewise.
2014-07-24 Jordi Mallach <jordi@gnu.org>
* doc/texinfo/nano.texi, doc/man/nanorc.5: Typo fix.
static char **lintargs = NULL;
char *lintcopy;
char *convendptr = NULL;
- const sc *s;
lintstruct *lints = NULL, *tmplint = NULL, *curlint = NULL;
if (!openfile->syntax || !openfile->syntax->linter) {
bottombars(MLINTER);
tmplint = NULL;
curlint = lints;
- while (1) {
+ while (TRUE) {
ssize_t tmpcol = 1;
int kbinput;
+ functionptrtype func;
if (curlint->colno > 0)
tmpcol = curlint->colno;
}
kbinput = get_kbinput(bottomwin);
- s = get_shortcut(&kbinput);
+ func = func_from_key(&kbinput);
tmplint = curlint;
- if (!s)
- continue;
- else if (s->scfunc == do_cancel)
+ if (func == do_cancel)
break;
- else if (s->scfunc == do_help_void) {
+ else if (func == do_help_void) {
tmplint = NULL;
do_help_void();
- } else if (s->scfunc == do_page_down) {
+ } else if (func == do_page_down) {
if (curlint->next != NULL)
curlint = curlint->next;
- else {
+ else
statusbar(_("At last message"));
- continue;
- }
- } else if (s->scfunc == do_page_up) {
+ } else if (func == do_page_up) {
if (curlint->prev != NULL)
curlint = curlint->prev;
- else {
+ else
statusbar(_("At first message"));
- continue;
- }
}
}
blank_statusbar();