Removing a superfluous switch statement.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4958 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
fc35e20052
commit
8cc8b08dfc
|
@ -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:
|
||||||
|
|
58
src/nano.c
58
src/nano.c
|
@ -1667,54 +1667,48 @@ int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_shortcut) {
|
if (have_shortcut) {
|
||||||
switch (input) {
|
/* If the function associated with this shortcut is
|
||||||
/* Handle the normal edit-window shortcuts. */
|
* cutting or copying text, remember this. */
|
||||||
default:
|
if (s->scfunc == do_cut_text_void
|
||||||
/* If the function associated with this shortcut is
|
|
||||||
* cutting or copying text, indicate this. */
|
|
||||||
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;
|
||||||
|
|
||||||
if (s->scfunc != 0) {
|
if (s->scfunc != 0) {
|
||||||
const subnfunc *f = sctofunc((sc *) s);
|
const subnfunc *f = sctofunc((sc *) s);
|
||||||
if (ISSET(VIEW_MODE) && f && !f->viewok)
|
if (ISSET(VIEW_MODE) && f && !f->viewok)
|
||||||
print_view_warning();
|
print_view_warning();
|
||||||
else {
|
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);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
s->scfunc();
|
/* Execute the function of the shortcut. */
|
||||||
|
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
|
||||||
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;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue