aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-14 19:57:00 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-05-14 20:05:39 +0800
commitdca0412d378131ca6c8a64f7adb8937493c43883 (patch)
tree7e3015b0c62bc523f8171c905caffea99b6903d8 /src/nvim/testdir
parent24eb1af4754b3061d0968112342ca5389b68d4f6 (diff)
downloadrneovim-dca0412d378131ca6c8a64f7adb8937493c43883.tar.gz
rneovim-dca0412d378131ca6c8a64f7adb8937493c43883.tar.bz2
rneovim-dca0412d378131ca6c8a64f7adb8937493c43883.zip
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 vim/vim#10420) https://github.com/vim/vim/commit/2e444bbef0f36535bf941f007f2961f3f66bbe87
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_smartindent.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_smartindent.vim b/src/nvim/testdir/test_smartindent.vim
index 3d685eb2fe..f3650a9ac4 100644
--- a/src/nvim/testdir/test_smartindent.vim
+++ b/src/nvim/testdir/test_smartindent.vim
@@ -67,6 +67,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