diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-03-02 06:35:20 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2025-03-02 07:02:10 +0800 |
| commit | 26775183ff67968cef06d42666f451c0d1e5c4dc (patch) | |
| tree | 5f8688f8f6cf11adb11e2a8f7638802fe3e013b7 /test | |
| parent | 47b748af5465201cfba710efb9ca695d2b19304b (diff) | |
| download | rneovim-26775183ff67968cef06d42666f451c0d1e5c4dc.tar.gz rneovim-26775183ff67968cef06d42666f451c0d1e5c4dc.tar.bz2 rneovim-26775183ff67968cef06d42666f451c0d1e5c4dc.zip | |
vim-patch:9.1.1160: Ctrl-Y does not work well with "preinsert" when completing items
Problem: The 'preinsert' feature requires Ctrl-Y to confirm insertion,
but Ctrl-Y only works when the popup menu (pum) is displayed.
Without enforcing this dependency, it could lead to confusing
behavior or non-functional features.
Solution: Modify ins_compl_has_preinsert() to check for both 'menu' and
'menuone' flags when 'preinsert' is set. Update documentation
to clarify this requirement. This avoids adding complex
conditional behaviors. (glepnir)
fixes: vim/vim#16728
closes: vim/vim#16753
https://github.com/vim/vim/commit/a2c5559f297a18dc1ce3c4f1f9fd6204aed321c9
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/old/testdir/test_ins_complete.vim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim index cf9c970a22..d1f9d77287 100644 --- a/test/old/testdir/test_ins_complete.vim +++ b/test/old/testdir/test_ins_complete.vim @@ -3110,10 +3110,11 @@ function Test_completeopt_preinsert() call assert_equal("fobar", getline('.')) call assert_equal(5, col('.')) + " When the pum is not visible, the preinsert has no effect set cot=preinsert call feedkeys("Sfoo1 foo2\<CR>f\<C-X>\<C-N>bar", 'tx') - call assert_equal("fbar", getline('.')) - call assert_equal(4, col('.')) + call assert_equal("foo1bar", getline('.')) + call assert_equal(7, col('.')) bw! set cot& |