From 39fdb868322fe32f2dcc7187b6f2f698e24b93f8 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 20 May 2021 21:14:59 -0400 Subject: vim-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. https://github.com/vim/vim/commit/eebd555733491cb55b9f30fe28772c0fd0ebacf7 --- src/nvim/testdir/test_functions.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 15b5bffd81..b81dce9940 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -1067,6 +1067,18 @@ func Test_inputlist() call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\3\", 'tx') call assert_equal(3, c) + " CR to cancel + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\\", 'tx') + call assert_equal(0, c) + + " Esc to cancel + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\\", 'tx') + call assert_equal(0, c) + + " q to cancel + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\q", 'tx') + call assert_equal(0, c) + call assert_fails('call inputlist("")', 'E686:') endfunc -- cgit