Using still more the func_from_key() wrapper instead of get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
266e0496ab
commit
47dffa483f
|
@ -5,6 +5,7 @@
|
||||||
* src/global.c (first_sc_for): Move this too to a better place.
|
* 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
|
* src/prompt.c (do_yesno_prompt): Use the new and more direct
|
||||||
func_from_key() wrapper instead of get_shortcut().
|
func_from_key() wrapper instead of get_shortcut().
|
||||||
|
* src/text.c (do_linter): Likewise.
|
||||||
|
|
||||||
2014-07-24 Jordi Mallach <jordi@gnu.org>
|
2014-07-24 Jordi Mallach <jordi@gnu.org>
|
||||||
* doc/texinfo/nano.texi, doc/man/nanorc.5: Typo fix.
|
* doc/texinfo/nano.texi, doc/man/nanorc.5: Typo fix.
|
||||||
|
|
24
src/text.c
24
src/text.c
|
@ -2934,7 +2934,6 @@ void do_linter(void)
|
||||||
static char **lintargs = NULL;
|
static char **lintargs = NULL;
|
||||||
char *lintcopy;
|
char *lintcopy;
|
||||||
char *convendptr = NULL;
|
char *convendptr = NULL;
|
||||||
const sc *s;
|
|
||||||
lintstruct *lints = NULL, *tmplint = NULL, *curlint = NULL;
|
lintstruct *lints = NULL, *tmplint = NULL, *curlint = NULL;
|
||||||
|
|
||||||
if (!openfile->syntax || !openfile->syntax->linter) {
|
if (!openfile->syntax || !openfile->syntax->linter) {
|
||||||
|
@ -3135,9 +3134,10 @@ void do_linter(void)
|
||||||
bottombars(MLINTER);
|
bottombars(MLINTER);
|
||||||
tmplint = NULL;
|
tmplint = NULL;
|
||||||
curlint = lints;
|
curlint = lints;
|
||||||
while (1) {
|
while (TRUE) {
|
||||||
ssize_t tmpcol = 1;
|
ssize_t tmpcol = 1;
|
||||||
int kbinput;
|
int kbinput;
|
||||||
|
functionptrtype func;
|
||||||
|
|
||||||
if (curlint->colno > 0)
|
if (curlint->colno > 0)
|
||||||
tmpcol = curlint->colno;
|
tmpcol = curlint->colno;
|
||||||
|
@ -3193,30 +3193,24 @@ void do_linter(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
kbinput = get_kbinput(bottomwin);
|
kbinput = get_kbinput(bottomwin);
|
||||||
s = get_shortcut(&kbinput);
|
func = func_from_key(&kbinput);
|
||||||
tmplint = curlint;
|
tmplint = curlint;
|
||||||
|
|
||||||
if (!s)
|
if (func == do_cancel)
|
||||||
continue;
|
|
||||||
else if (s->scfunc == do_cancel)
|
|
||||||
break;
|
break;
|
||||||
else if (s->scfunc == do_help_void) {
|
else if (func == do_help_void) {
|
||||||
tmplint = NULL;
|
tmplint = NULL;
|
||||||
do_help_void();
|
do_help_void();
|
||||||
} else if (s->scfunc == do_page_down) {
|
} else if (func == do_page_down) {
|
||||||
if (curlint->next != NULL)
|
if (curlint->next != NULL)
|
||||||
curlint = curlint->next;
|
curlint = curlint->next;
|
||||||
else {
|
else
|
||||||
statusbar(_("At last message"));
|
statusbar(_("At last message"));
|
||||||
continue;
|
} else if (func == do_page_up) {
|
||||||
}
|
|
||||||
} else if (s->scfunc == do_page_up) {
|
|
||||||
if (curlint->prev != NULL)
|
if (curlint->prev != NULL)
|
||||||
curlint = curlint->prev;
|
curlint = curlint->prev;
|
||||||
else {
|
else
|
||||||
statusbar(_("At first message"));
|
statusbar(_("At first message"));
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
blank_statusbar();
|
blank_statusbar();
|
||||||
|
|
Loading…
Reference in New Issue