comparison src/testdir/test_smartindent.vim @ 28860:3942ea75b4c0 v8.2.4953

patch 8.2.4953: with 'si' inserting '}' after completion goes wrong Commit: https://github.com/vim/vim/commit/2e444bbef0f36535bf941f007f2961f3f66bbe87 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 14 12:54:23 2022 +0100 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 https://github.com/vim/vim/issues/10420)
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 May 2022 14:00:03 +0200
parents 948877671c54
children
comparison
equal deleted inserted replaced
28859:f03467bfe27c 28860:3942ea75b4c0
138 new 138 new
139 setlocal ai smartindent indentexpr= 139 setlocal ai smartindent indentexpr=
140 call setline(1, 'foo foot') 140 call setline(1, 'foo foot')
141 call feedkeys("o f\<C-X>\<C-N>#", 'tx') 141 call feedkeys("o f\<C-X>\<C-N>#", 'tx')
142 call assert_equal(' foo#', getline(2)) 142 call assert_equal(' foo#', getline(2))
143
144 call setline(2, '')
145 call feedkeys("1Go f\<C-X>\<C-N>}", 'tx')
146 call assert_equal(' foo}', getline(2))
147
143 bwipe! 148 bwipe!
144 endfunc 149 endfunc
145 150
146 func Test_no_si_after_completion() 151 func Test_no_si_after_completion()
147 new 152 new