diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-02-05 20:03:02 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-05 20:05:04 +0800 |
| commit | e6cfd20b7fdeea2478c444e6f9b60c1e18ccdf00 (patch) | |
| tree | 0f5e2cac5d1c437b610d24e11741378fd690ed11 /src/nvim/testdir | |
| parent | 806a7c976d78da2bf7a46499452b4a3e30fae798 (diff) | |
| download | rneovim-e6cfd20b7fdeea2478c444e6f9b60c1e18ccdf00.tar.gz rneovim-e6cfd20b7fdeea2478c444e6f9b60c1e18ccdf00.tar.bz2 rneovim-e6cfd20b7fdeea2478c444e6f9b60c1e18ccdf00.zip | |
vim-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.
https://github.com/vim/vim/commit/fc88df42f1ae64bcc4d6cbc0fbd3445f8c59afdf
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_vartabs.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_vartabs.vim b/src/nvim/testdir/test_vartabs.vim index 46e0d62313..d05008d2dd 100644 --- a/src/nvim/testdir/test_vartabs.vim +++ b/src/nvim/testdir/test_vartabs.vim @@ -135,6 +135,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() if !exists("+breakindent") return |