Mercurial > vim
diff src/testdir/test_vartabs.vim @ 27543:8e8fb566dfa5 v8.2.4298
patch 8.2.4298: divide by zero with huge tabstop value
Commit: https://github.com/vim/vim/commit/fc88df42f1ae64bcc4d6cbc0fbd3445f8c59afdf
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 5 11:13:05 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Feb 2022 12:15:04 +0100 |
parents | 4c1b6f3eb96b |
children | c3b34e4bbe34 |
line wrap: on
line diff
--- a/src/testdir/test_vartabs.vim +++ b/src/testdir/test_vartabs.vim @@ -146,6 +146,16 @@ func Test_vartabs() 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