1
0
forked from aniani/vim

patch 8.2.4953: with 'si' inserting '}' after completion goes wrong

Problem:    With 'smartindent' inserting '}' after completion goes wrong.
Solution:   Check the cursor is in indent.  (closes #10420)
This commit is contained in:
Bram Moolenaar
2022-05-14 12:54:23 +01:00
parent 98feacedf9
commit 2e444bbef0
3 changed files with 9 additions and 1 deletions

View File

@@ -140,6 +140,11 @@ func Test_si_after_completion()
call setline(1, 'foo foot')
call feedkeys("o f\<C-X>\<C-N>#", 'tx')
call assert_equal(' foo#', getline(2))
call setline(2, '')
call feedkeys("1Go f\<C-X>\<C-N>}", 'tx')
call assert_equal(' foo}', getline(2))
bwipe!
endfunc