Adjusting the indentation after the previous change.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2016-01-03 17:37:05 +00:00
parent 0d85c8c68c
commit 42a761e77f
2 changed files with 21 additions and 23 deletions

View File

@ -7,6 +7,7 @@
instead of doing it always. instead of doing it always.
* src/color.c (reset_multis): Abort when having no multiline regexes. * src/color.c (reset_multis): Abort when having no multiline regexes.
* src/nano.c (do_input): A functionless shortcut should be impossible. * src/nano.c (do_input): A functionless shortcut should be impossible.
* src/nano.c (do_input): Adjust indentation.
2016-01-02 Benno Schulenberg <bensberg@justemail.net> 2016-01-02 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_spell, do_formatter): Plug three tiny memory leaks. * src/text.c (do_spell, do_formatter): Plug three tiny memory leaks.

View File

@ -1664,7 +1664,6 @@ int do_input(bool allow_funcs)
kbinput = (int *)nrealloc(kbinput, kbinput_len * kbinput = (int *)nrealloc(kbinput, kbinput_len *
sizeof(int)); sizeof(int));
kbinput[kbinput_len - 1] = input; kbinput[kbinput_len - 1] = input;
} }
} }
@ -1703,6 +1702,7 @@ int do_input(bool allow_funcs)
} }
if (have_shortcut) { if (have_shortcut) {
const subnfunc *f = sctofunc((sc *)s);
/* If the function associated with this shortcut is /* If the function associated with this shortcut is
* cutting or copying text, remember this. */ * cutting or copying text, remember this. */
if (s->scfunc == do_cut_text_void if (s->scfunc == do_cut_text_void
@ -1716,34 +1716,31 @@ int do_input(bool allow_funcs)
statusbar("Internal error: shortcut without function!"); statusbar("Internal error: shortcut without function!");
return ERR; return ERR;
} }
{ if (ISSET(VIEW_MODE) && f && !f->viewok)
const subnfunc *f = sctofunc((sc *) s); print_view_warning();
if (ISSET(VIEW_MODE) && f && !f->viewok) else {
print_view_warning();
else {
#ifndef NANO_TINY #ifndef NANO_TINY
if (s->scfunc == do_toggle_void) { if (s->scfunc == do_toggle_void) {
do_toggle(s->toggle); do_toggle(s->toggle);
if (s->toggle != CUT_TO_END) if (s->toggle != CUT_TO_END)
preserve = TRUE; preserve = TRUE;
} else } else
#endif #endif
{ {
/* Execute the function of the shortcut. */ /* Execute the function of the shortcut. */
s->scfunc(); s->scfunc();
#ifndef DISABLE_COLOR #ifndef DISABLE_COLOR
if (f && !f->viewok) if (f && !f->viewok)
reset_multis(openfile->current, FALSE); reset_multis(openfile->current, FALSE);
#endif #endif
if (edit_refresh_needed) { if (edit_refresh_needed) {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n"); fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
#endif #endif
edit_refresh(); edit_refresh();
edit_refresh_needed = FALSE; edit_refresh_needed = FALSE;
} else if (s->scfunc == do_delete || s->scfunc == do_backspace) } else if (s->scfunc == do_delete || s->scfunc == do_backspace)
update_line(openfile->current, openfile->current_x); update_line(openfile->current, openfile->current_x);
}
} }
} }
} }