aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-02-21 08:25:11 +0800
committerGitHub <noreply@github.com>2025-02-21 08:25:11 +0800
commitf4cd5a33b6b06fe77652e19eba46af107de36a2b (patch)
treec6e14a08f22b76ade8ba172c51ca0b0e7c87a04f /test
parentb96c3d9a51ad37500623e45b143335b3d49a12dd (diff)
downloadrneovim-f4cd5a33b6b06fe77652e19eba46af107de36a2b.tar.gz
rneovim-f4cd5a33b6b06fe77652e19eba46af107de36a2b.tar.bz2
rneovim-f4cd5a33b6b06fe77652e19eba46af107de36a2b.zip
vim-patch:9.1.1127: preinsert text is not cleaned up correctly (#32544)
Problem: when 'completeopt' is set to preinsert the preinserted text is not cleared when adding new leader (Yee Cheng Chin) Solution: add a condition to delete preinsert text in edit function (glepnir) closes: vim/vim#16672 https://github.com/vim/vim/commit/52fd867f5e8a371653ee4fb6664593c82030f855 Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_ins_complete.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim
index 4d4a17e850..a0570c7c5d 100644
--- a/test/old/testdir/test_ins_complete.vim
+++ b/test/old/testdir/test_ins_complete.vim
@@ -3110,6 +3110,11 @@ function Test_completeopt_preinsert()
call assert_equal("fobar", getline('.'))
call assert_equal(5, col('.'))
+ 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('.'))
+
bw!
set cot&
set omnifunc&