diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-05 09:18:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 09:18:42 +0800 |
commit | 419819b6245e120aba8897e3ddea711b2cd0246c (patch) | |
tree | 6a86105155ec9abc9553d3ed69a30321f4be9a01 /src/nvim/testdir | |
parent | b44b8e7687ece66f4c535182071223d78ca54ad0 (diff) | |
download | rneovim-419819b6245e120aba8897e3ddea711b2cd0246c.tar.gz rneovim-419819b6245e120aba8897e3ddea711b2cd0246c.tar.bz2 rneovim-419819b6245e120aba8897e3ddea711b2cd0246c.zip |
vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)
Problem: CTRL-X on 2**64 subtracts two. (James McCoy)
Solution: Correct computation for large number. (closes vim/vim#12103)
https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_increment.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_increment.vim b/src/nvim/testdir/test_increment.vim index 3c2b88ef9f..433b2b4471 100644 --- a/src/nvim/testdir/test_increment.vim +++ b/src/nvim/testdir/test_increment.vim @@ -841,6 +841,22 @@ func Test_increment_unsigned() set nrformats-=unsigned endfunc +func Test_in_decrement_large_number() + " NOTE: 18446744073709551616 == 2^64 + call setline(1, '18446744073709551616') + exec "norm! gg0\<C-X>" + call assert_equal('18446744073709551615', getline(1)) + + exec "norm! gg0\<C-X>" + call assert_equal('18446744073709551614', getline(1)) + + exec "norm! gg0\<C-A>" + call assert_equal('18446744073709551615', getline(1)) + + exec "norm! gg0\<C-A>" + call assert_equal('-18446744073709551615', getline(1)) +endfunc + func Test_normal_increment_with_virtualedit() set virtualedit=all |