Commit fbf46a5d authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

in do_(statusbar_)?input(), if we get NANO_CONTROL_8, handle it instead

of ignoring it, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3451 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 28 additions and 14 deletions
+28 -14
...@@ -133,10 +133,16 @@ CVS code - ...@@ -133,10 +133,16 @@ CVS code -
- nano.c: - nano.c:
renumber() renumber()
- Remove invalid assert. (DLR, found by Filipe Moreira) - Remove invalid assert. (DLR, found by Filipe Moreira)
do_input()
- If we get NANO_CONTROL_8, handle it instead of ignoring it,
for consistency. (DLR)
- nano.h: - nano.h:
- Reorder the toggle #defines to match their corresponding order - Reorder the toggle #defines to match their corresponding order
in toggle_init(). (DLR) in toggle_init(). (DLR)
- prompt.c: - prompt.c:
do_statusbar_input()
- If we get NANO_CONTROL_8, handle it instead of ignoring it,
for consistency. (DLR)
get_prompt_string() get_prompt_string()
- Include the handling of the help key even when help is - Include the handling of the help key even when help is
disabled, so that we aren't erroneously kicked out of the disabled, so that we aren't erroneously kicked out of the
......
...@@ -1281,16 +1281,20 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool ...@@ -1281,16 +1281,20 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
/* Read in a character. */ /* Read in a character. */
input = get_kbinput(edit, meta_key, func_key); input = get_kbinput(edit, meta_key, func_key);
if (allow_funcs) {
#ifndef DISABLE_MOUSE #ifndef DISABLE_MOUSE
/* If we got a mouse click and it was on a shortcut, read in the /* If we got a mouse click and it was on a shortcut, read in the
* shortcut character. */ * shortcut character. */
if (allow_funcs && *func_key == TRUE && input == KEY_MOUSE) { if (*func_key == TRUE && input == KEY_MOUSE)
if (do_mouse()) input = do_mouse() ? get_kbinput(edit, meta_key, func_key) :
input = get_kbinput(edit, meta_key, func_key); ERR;
else else
input = ERR;
}
#endif #endif
if (input == NANO_CONTROL_8 && *meta_key == FALSE &&
*func_key == FALSE)
input = ISSET(REBIND_DELETE) ? NANO_BACKSPACE_KEY :
NANO_DELETE_KEY;
}
/* Check for a shortcut in the main list. */ /* Check for a shortcut in the main list. */
s = get_shortcut(main_list, &input, meta_key, func_key); s = get_shortcut(main_list, &input, meta_key, func_key);
......
...@@ -68,16 +68,20 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t, ...@@ -68,16 +68,20 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
/* Read in a character. */ /* Read in a character. */
input = get_kbinput(bottomwin, meta_key, func_key); input = get_kbinput(bottomwin, meta_key, func_key);
if (allow_funcs) {
#ifndef DISABLE_MOUSE #ifndef DISABLE_MOUSE
/* If we got a mouse click and it was on a shortcut, read in the /* If we got a mouse click and it was on a shortcut, read in the
* shortcut character. */ * shortcut character. */
if (allow_funcs && *func_key == TRUE && input == KEY_MOUSE) { if (*func_key == TRUE && input == KEY_MOUSE)
if (do_statusbar_mouse()) input = do_statusbar_mouse() ? get_kbinput(bottomwin,
input = get_kbinput(bottomwin, meta_key, func_key); meta_key, func_key) : ERR;
else else
input = ERR;
}
#endif #endif
if (input == NANO_CONTROL_8 && *meta_key == FALSE &&
*func_key == FALSE)
input = ISSET(REBIND_DELETE) ? NANO_BACKSPACE_KEY :
NANO_DELETE_KEY;
}
/* Check for a shortcut in the current list. */ /* Check for a shortcut in the current list. */
s = get_shortcut(currshortcut, &input, meta_key, func_key); s = get_shortcut(currshortcut, &input, meta_key, func_key);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment