mirror of
https://github.com/neovim/neovim.git
synced 2026-05-05 05:25:10 +00:00
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
52fd867f5e
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -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&
|
||||
|
||||
Reference in New Issue
Block a user