aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-14 20:48:05 +0800
committerGitHub <noreply@github.com>2022-05-14 20:48:05 +0800
commitd547e21f9edfb600c8a55a23db1ad847d35b53a0 (patch)
tree7e3015b0c62bc523f8171c905caffea99b6903d8 /src/nvim/testdir
parent99f3e74fc27acb0d9d9f32161e18b5a474697074 (diff)
parentdca0412d378131ca6c8a64f7adb8937493c43883 (diff)
downloadrneovim-d547e21f9edfb600c8a55a23db1ad847d35b53a0.tar.gz
rneovim-d547e21f9edfb600c8a55a23db1ad847d35b53a0.tar.bz2
rneovim-d547e21f9edfb600c8a55a23db1ad847d35b53a0.zip
Merge pull request #18567 from zeertzjq/vim-8.2.4951
vim-patch:8.2.{4951,4953}: with 'si' inserting char after completion goes wrong
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_smartindent.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_smartindent.vim b/src/nvim/testdir/test_smartindent.vim
index dc0f99e93f..f3650a9ac4 100644
--- a/src/nvim/testdir/test_smartindent.vim
+++ b/src/nvim/testdir/test_smartindent.vim
@@ -61,4 +61,26 @@ func Test_smartindent_braces()
close!
endfunc
+func Test_si_after_completion()
+ new
+ setlocal ai smartindent indentexpr=
+ 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
+
+func Test_no_si_after_completion()
+ new
+ call setline(1, 'foo foot')
+ call feedkeys("o f\<C-X>\<C-N>#", 'tx')
+ call assert_equal(' foo#', getline(2))
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab