patch 8.2.4298: divide by zero with huge tabstop value
Problem: Divide by zero with huge tabstop value.
Solution: Reject tabstop value that overflows to zero.
diff --git a/src/testdir/test_vartabs.vim b/src/testdir/test_vartabs.vim
index 3b8a9ce..156233d 100644
--- a/src/testdir/test_vartabs.vim
+++ b/src/testdir/test_vartabs.vim
@@ -146,6 +146,16 @@
bwipeout!
endfunc
+func Test_retab_invalid_arg()
+ new
+ call setline(1, "\ttext")
+ retab 0
+ call assert_fails("retab -8", 'E487: Argument must be positive')
+ call assert_fails("retab 10000", 'E475:')
+ call assert_fails("retab 720575940379279360", 'E475:')
+ bwipe!
+endfunc
+
func Test_vartabs_breakindent()
CheckOption breakindent
new