vim-patch:9.1.1747: completion: redo (.) broken with preinsert and autocompletion (#35698)

Problem:  completion: redo (.) broken with preinsert and autocompletion
Solution: Make redo (.) work with preinsert and autocompletion
          (Girish Palya)

closes: vim/vim#18253

306a138172

Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
zeertzjq
2025-09-10 07:53:33 +08:00
committed by GitHub
parent 739fc26d77
commit f6ed46c2a7
2 changed files with 11 additions and 4 deletions

View File

@@ -5747,6 +5747,13 @@ func Test_autocomplete_completeopt_preinsert()
" Should not work with fuzzy
set cot+=fuzzy
call DoTest("f", 'f', 2)
set cot-=fuzzy
" Verify that redo (dot) works
call setline(1, ["foobar", "foozbar", "foobaz", "changed", "change"])
call feedkeys($"/foo\<CR>", 'tx')
call feedkeys($"cwch\<C-N>\<Esc>n.n.", 'tx')
call assert_equal(repeat(['changed'], 3), getline(1, 3))
%delete _
let &l:undolevels = &l:undolevels