patch 9.1.1121: Enter does not insert newline with "noselect"
Problem: Enter does not insert newline with "noselect" when the pum is
visible (lifepillar)
Solution: When Enter is pressed and no complete-item is selected,
ins_compl_prep returns false, and the edit function continues
processing Enter to insert a new line. (glepnir)
fixes: #1653
closes: #16653
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 7c8faa9..63f0016 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -987,7 +987,7 @@
call setline(1, ['Post', 'Port', 'Po'])
let expected=['Post', 'Port', 'Port']
call cursor(3,2)
- call feedkeys("A\<C-X>". repeat("\<C-P>", 3). "rt\<cr>", 'tx')
+ call feedkeys("A\<C-X>". repeat("\<C-P>", 3). "rt\<C-Y>", 'tx')
call assert_equal(expected, getline(1,'$'))
bwipe!
endfunc
@@ -997,7 +997,7 @@
call setline(1, ['Post', 'Port', 'Po'])
let expected=['Post', 'Port', 'Port']
call cursor(3,2)
- call feedkeys("A\<C-P>\<C-N>rt\<cr>", 'tx')
+ call feedkeys("A\<C-P>\<C-N>rt\<C-Y>", 'tx')
call assert_equal(expected, getline(1,'$'))
bwipe!
endfunc