diff src/testdir/test_tab.vim @ 14276:752ef53d3731 v8.1.0154

patch 8.1.0154: crash with "set smarttab shiftwidth=0 softtabstop=-1" commit https://github.com/vim/vim/commit/c9fe5ab3b093803b6e8d03358ba16aca6b6f0db1 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 5 22:27:08 2018 +0200 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 https://github.com/vim/vim/issues/3155)
author Christian Brabandt <cb@256bit.org>
date Thu, 05 Jul 2018 22:30:06 +0200
parents fbf0681606fa
children 08940efa6b4e
line wrap: on
line diff
--- 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