patch 8.1.0154: crash with "set smarttab shiftwidth=0 softtabstop=-1"
Problem: Crash with "set smarttab shiftwidth=0 softtabstop=-1".
Solution: Fall back to using 'tabstop'. (closes #3155)
diff --git a/src/testdir/test_tab.vim b/src/testdir/test_tab.vim
index 3be3024..b8e8dfe 100644
--- a/src/testdir/test_tab.vim
+++ b/src/testdir/test_tab.vim
@@ -76,6 +76,15 @@
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