summaryrefslogtreecommitdiff
path: root/src/testdir/test_tab.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-05 22:27:08 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-05 22:27:08 +0200
commitc9fe5ab3b093803b6e8d03358ba16aca6b6f0db1 (patch)
tree7ae32535ac0e6f4c08d7e550a621c5656b5c8ce5 /src/testdir/test_tab.vim
parente85ce6ea2e09fe4d61c94e34e9e437c3c1f20b6e (diff)
downloadvim-git-c9fe5ab3b093803b6e8d03358ba16aca6b6f0db1.tar.gz
patch 8.1.0154: crash with "set smarttab shiftwidth=0 softtabstop=-1"v8.1.0154
Problem: Crash with "set smarttab shiftwidth=0 softtabstop=-1". Solution: Fall back to using 'tabstop'. (closes #3155)
Diffstat (limited to 'src/testdir/test_tab.vim')
-rw-r--r--src/testdir/test_tab.vim11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testdir/test_tab.vim b/src/testdir/test_tab.vim
index 3be30245b..b8e8dfe06 100644
--- a/src/testdir/test_tab.vim
+++ b/src/testdir/test_tab.vim
@@ -76,6 +76,15 @@ func Test_softtabstop()
exe "normal A\<BS>x\<Esc>"
call assert_equal("x x", getline(1))
- set sts=0 sw=0 backspace&
+ call setline(1, 'x')
+ set sts=-1 sw=0 smarttab
+ exe "normal I\<Tab>\<Esc>"
+ call assert_equal("\tx", getline(1))
+
+ call setline(1, 'x')
+ exe "normal I\<Tab>\<BS>\<Esc>"
+ call assert_equal("x", getline(1))
+
+ set sts=0 sw=0 backspace& nosmarttab
bwipe!
endfunc