aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-14 18:55:50 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-05-14 20:05:39 +0800
commit24eb1af4754b3061d0968112342ca5389b68d4f6 (patch)
treef39bf17c2160fb95f32ae0d81dd7d90d66375180 /src/nvim/testdir
parent99f3e74fc27acb0d9d9f32161e18b5a474697074 (diff)
downloadrneovim-24eb1af4754b3061d0968112342ca5389b68d4f6.tar.gz
rneovim-24eb1af4754b3061d0968112342ca5389b68d4f6.tar.bz2
rneovim-24eb1af4754b3061d0968112342ca5389b68d4f6.zip
vim-patch:8.2.4951: smart indenting done when not enabled
Problem: Smart indenting done when not enabled. Solution: Check option values before setting can_si. (closes vim/vim#10420) https://github.com/vim/vim/commit/de5cf287812510d2c8ffe66b99cf33c4e1a6e6f1
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_smartindent.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_smartindent.vim b/src/nvim/testdir/test_smartindent.vim
index dc0f99e93f..3d685eb2fe 100644
--- a/src/nvim/testdir/test_smartindent.vim
+++ b/src/nvim/testdir/test_smartindent.vim
@@ -61,4 +61,21 @@ 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))
+ 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