diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-22 10:12:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-22 10:12:42 -0400 |
commit | 449bbf5540886a9b892b551162080e2dc9a37990 (patch) | |
tree | f600e2fa5888e5273aa6a7ef69e09cf407a1755f /src/nvim/misc1.c | |
parent | 6dd04ed5f6c0b68eed38aeb2a3f930d8d6353678 (diff) | |
parent | 486050ebc94d125b6a30340ec595ef62956624a7 (diff) | |
download | rneovim-449bbf5540886a9b892b551162080e2dc9a37990.tar.gz rneovim-449bbf5540886a9b892b551162080e2dc9a37990.tar.bz2 rneovim-449bbf5540886a9b892b551162080e2dc9a37990.zip |
Merge pull request #14601 from janlazo/vim-8.1.2320
vim-patch:8.1.{2320,2339},8.2.{946,1591,2875}
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 68a1bba78d..38d0a7dadf 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -753,8 +753,12 @@ get_number ( skip_redraw = TRUE; /* skip redraw once */ do_redraw = FALSE; break; - } else if (c == CAR || c == NL || c == Ctrl_C || c == ESC) + } else if (c == Ctrl_C || c == ESC || c == 'q') { + n = 0; break; + } else if (c == CAR || c == NL) { + break; + } } no_mapping--; return n; @@ -771,11 +775,13 @@ int prompt_for_number(int *mouse_used) int save_cmdline_row; int save_State; - /* When using ":silent" assume that <CR> was entered. */ - if (mouse_used != NULL) - MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): ")); - else - MSG_PUTS(_("Type number and <Enter> (empty cancels): ")); + // When using ":silent" assume that <CR> was entered. + if (mouse_used != NULL) { + MSG_PUTS(_("Type number and <Enter> or click with the mouse " + "(q or empty cancels): ")); + } else { + MSG_PUTS(_("Type number and <Enter> (q or empty cancels): ")); + } /* Set the state such that text can be selected/copied/pasted and we still * get mouse events. */ |