commit c7ca28a6ba4deab99341a4da66cb603533df6a44
parent 6ccf0e23864bc5a2cb16e26ba1446399bae7ca50
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 7 Sep 2004 21:51:49 +0000
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
Diffstat:
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -2,14 +2,15 @@ CVS code -
- General:
- Convert more ints that hold only TRUE and FALSE values to
bools. (DLR)
- - Consolidate the code for finding a shortcut in a shortcut
- list, the code for finding a toogle in a toggle list, and
- the code for doing both of those and interpreting mouse clicks
- in the edit window. Also move the code for do_mouse() to
- get_edit_mouse() and tweak it to properly handle cases where a
- shortcut isn't clicked. New functions get_shortcut(),
- get_toggle(), get_edit_input(), and get_edit_mouse(); changes
- to do_browser(), do_justify(), do_help(), and main(). (DLR)
+ - Consolidate the code for finding and running a shortcut in a
+ shortcut list, the code for finding and toggling a toggle in a
+ toggle list, and the code for doing both of those and
+ interpreting mouse clicks in the edit window. Also move the
+ code for do_mouse() to get_edit_mouse() and tweak it to
+ properly handle cases where a shortcut isn't clicked. New
+ functions get_shortcut(), get_toggle(), get_edit_input(), and
+ get_edit_mouse(); changes to do_browser(), do_justify(),
+ do_help(), and main(). (DLR)
- Simplify a few more translated messages. (DLR)
- Translation updates (see po/ChangeLog for details).
- Remove reference to @includedir@ in src/Makefile.am, as it's
diff --git a/src/winio.c b/src/winio.c
@@ -1440,8 +1440,12 @@ int get_edit_input(bool *meta_key, bool allow_funcs)
if (s->func != do_cut_text)
cutbuffer_reset();
if (s->func != NULL) {
- if (allow_funcs)
- s->func();
+ if (allow_funcs) {
+ if (ISSET(VIEW_MODE) && !s->viewok)
+ print_view_warning();
+ else
+ s->func();
+ }
keyhandled = TRUE;
}
}