Removing a superfluous switch statement.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4958 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-06-11 18:34:35 +00:00
parent fc35e20052
commit 8cc8b08dfc
2 changed files with 27 additions and 32 deletions

View File

@ -7,6 +7,7 @@
next cut. These two changes together fix Savannah bug #42326. next cut. These two changes together fix Savannah bug #42326.
* src/nano.c (do_input): Always accept mouse events, also when * src/nano.c (do_input): Always accept mouse events, also when
just looking for Unjustify. This fixes Savannah bug #42322. just looking for Unjustify. This fixes Savannah bug #42322.
* src/nano.c (do_input): Remove a superfluous switch statement.
2014-06-10 Benno Schulenberg <bensberg@justemail.net> 2014-06-10 Benno Schulenberg <bensberg@justemail.net>
* src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c: * src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c:

View File

@ -1667,15 +1667,11 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
} }
if (have_shortcut) { if (have_shortcut) {
switch (input) {
/* Handle the normal edit-window shortcuts. */
default:
/* If the function associated with this shortcut is /* If the function associated with this shortcut is
* cutting or copying text, indicate this. */ * cutting or copying text, remember this. */
if (s->scfunc == do_cut_text_void if (s->scfunc == do_cut_text_void
#ifndef NANO_TINY #ifndef NANO_TINY
|| s->scfunc == do_copy_text || s->scfunc == || s->scfunc == do_copy_text || s->scfunc == do_cut_till_end
do_cut_till_end
#endif #endif
) )
cut_copy = TRUE; cut_copy = TRUE;
@ -1691,12 +1687,12 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
else else
#endif #endif
{ {
/* Execute the function of the shortcut. */
s->scfunc(); s->scfunc();
#ifndef DISABLE_COLOR #ifndef DISABLE_COLOR
if (f && !f->viewok && openfile->syntax != NULL if (f && !f->viewok && openfile->syntax != NULL
&& openfile->syntax->nmultis > 0) { && openfile->syntax->nmultis > 0)
reset_multis(openfile->current, FALSE); reset_multis(openfile->current, FALSE);
}
#endif #endif
if (edit_refresh_needed) { if (edit_refresh_needed) {
#ifdef DEBUG #ifdef DEBUG
@ -1708,13 +1704,11 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
} }
} }
} }
break;
}
} }
} }
/* If we aren't cutting or copying text, blow away the text in the /* If we aren't cutting or copying text, blow away the text in the
* cutbuffer. */ * cutbuffer upon the next cutting action. */
if (!cut_copy) if (!cut_copy)
cutbuffer_reset(); cutbuffer_reset();