From eebd555733491cb55b9f30fe28772c0fd0ebacf7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 10 Jun 2020 15:45:57 +0200 Subject: patch 8.2.0946: cannot use "q" to cancel a number prompt Problem: Cannot use "q" to cancel a number prompt. Solution: Recognize "q" instead of ignoring it. --- src/misc1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/misc1.c') diff --git a/src/misc1.c b/src/misc1.c index a370a82f8..db76d9bfa 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -945,7 +945,7 @@ get_number( do_redraw = FALSE; break; } - else if (c == CAR || c == NL || c == Ctrl_C || c == ESC) + else if (c == CAR || c == NL || c == Ctrl_C || c == ESC || c == 'q') break; } --no_mapping; @@ -967,9 +967,9 @@ prompt_for_number(int *mouse_used) // When using ":silent" assume that was entered. if (mouse_used != NULL) - msg_puts(_("Type number and or click with mouse (empty cancels): ")); + msg_puts(_("Type number and or click with the mouse (q or empty cancels): ")); else - msg_puts(_("Type number and (empty cancels): ")); + msg_puts(_("Type number and (q or empty cancels): ")); // Set the state such that text can be selected/copied/pasted and we still // get mouse events. redraw_after_callback() will not redraw if cmdline_row -- cgit v1.2.1