aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-02-12 22:51:13 +0000
committerGitHub <noreply@github.com>2022-02-12 22:51:13 +0000
commit7a7ac004f0288d693443804b8bed9bc233926dad (patch)
tree36e627ff60b74516f88fd5ff613453573f8564f5 /src/nvim/testdir
parent05f744cfc7411cd22320116f20ebcc1d06443fea (diff)
parent5c62bce7c12638c217f8297212698ed10bb5543b (diff)
downloadrneovim-7a7ac004f0288d693443804b8bed9bc233926dad.tar.gz
rneovim-7a7ac004f0288d693443804b8bed9bc233926dad.tar.bz2
rneovim-7a7ac004f0288d693443804b8bed9bc233926dad.zip
Merge pull request #17385 from seandewar/vim-8.2.4359
vim-patch:8.2.{4359,4362,4363,4364}: crash when repeatedly using :retab
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_retab.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_retab.vim b/src/nvim/testdir/test_retab.vim
index e7b8946ccf..1650a03876 100644
--- a/src/nvim/testdir/test_retab.vim
+++ b/src/nvim/testdir/test_retab.vim
@@ -69,6 +69,8 @@ func Test_retab()
call assert_equal(" a b c ", Retab('!', 3))
call assert_equal(" a b c ", Retab('', 5))
call assert_equal(" a b c ", Retab('!', 5))
+
+ set tabstop& expandtab&
endfunc
func Test_retab_error()
@@ -78,3 +80,22 @@ func Test_retab_error()
call assert_fails('ret 10000', 'E475:')
call assert_fails('ret 80000000000000000000', 'E475:')
endfunc
+
+func Test_retab_endless()
+ new
+ call setline(1, "\t0\t")
+ let caught = 'no'
+ try
+ while 1
+ set ts=4000
+ retab 4
+ endwhile
+ catch /E1240/
+ let caught = 'yes'
+ endtry
+ bwipe!
+ set tabstop&
+endfunc
+
+
+" vim: shiftwidth=2 sts=2 expandtab