make get_edit_input() respect view mode, and clarify its changelog entry

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1931 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-09-07 21:51:49 +00:00
parent 6ccf0e2386
commit c7ca28a6ba
2 changed files with 15 additions and 10 deletions

View File

@ -2,14 +2,15 @@ CVS code -
- General: - General:
- Convert more ints that hold only TRUE and FALSE values to - Convert more ints that hold only TRUE and FALSE values to
bools. (DLR) bools. (DLR)
- Consolidate the code for finding a shortcut in a shortcut - Consolidate the code for finding and running a shortcut in a
list, the code for finding a toogle in a toggle list, and shortcut list, the code for finding and toggling a toggle in a
the code for doing both of those and interpreting mouse clicks toggle list, and the code for doing both of those and
in the edit window. Also move the code for do_mouse() to interpreting mouse clicks in the edit window. Also move the
get_edit_mouse() and tweak it to properly handle cases where a code for do_mouse() to get_edit_mouse() and tweak it to
shortcut isn't clicked. New functions get_shortcut(), properly handle cases where a shortcut isn't clicked. New
get_toggle(), get_edit_input(), and get_edit_mouse(); changes functions get_shortcut(), get_toggle(), get_edit_input(), and
to do_browser(), do_justify(), do_help(), and main(). (DLR) get_edit_mouse(); changes to do_browser(), do_justify(),
do_help(), and main(). (DLR)
- Simplify a few more translated messages. (DLR) - Simplify a few more translated messages. (DLR)
- Translation updates (see po/ChangeLog for details). - Translation updates (see po/ChangeLog for details).
- Remove reference to @includedir@ in src/Makefile.am, as it's - Remove reference to @includedir@ in src/Makefile.am, as it's

View File

@ -1440,8 +1440,12 @@ int get_edit_input(bool *meta_key, bool allow_funcs)
if (s->func != do_cut_text) if (s->func != do_cut_text)
cutbuffer_reset(); cutbuffer_reset();
if (s->func != NULL) { if (s->func != NULL) {
if (allow_funcs) if (allow_funcs) {
s->func(); if (ISSET(VIEW_MODE) && !s->viewok)
print_view_warning();
else
s->func();
}
keyhandled = TRUE; keyhandled = TRUE;
} }
} }