diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-18 21:26:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-18 21:26:17 +0800 |
commit | 6b3ae24a70a15d485c6aadf059d3fa773f0da4cf (patch) | |
tree | 6258c0120ac4e41419388a69789fd2e0d24ec627 /src/nvim/testdir | |
parent | 1743359235206cbd9da2e0589f1caba37cce3b8c (diff) | |
download | rneovim-6b3ae24a70a15d485c6aadf059d3fa773f0da4cf.tar.gz rneovim-6b3ae24a70a15d485c6aadf059d3fa773f0da4cf.tar.bz2 rneovim-6b3ae24a70a15d485c6aadf059d3fa773f0da4cf.zip |
vim-patch:9.0.1072: screenpos() column result in fold may be too small (#21465)
Problem: screenpos() column result in fold may be too small.
Solution: Add space of 'number', sign column, etc. (closes vim/vim#11715)
https://github.com/vim/vim/commit/ba2d19193201277397c25c1f5a134ea042542555
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_cursor_func.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_cursor_func.vim b/src/nvim/testdir/test_cursor_func.vim index 2151076cb9..bb8e7cd5c5 100644 --- a/src/nvim/testdir/test_cursor_func.vim +++ b/src/nvim/testdir/test_cursor_func.vim @@ -138,8 +138,12 @@ func Test_screenpos_fold() redraw call assert_equal(2, screenpos(1, 2, 1).row) call assert_equal(#{col: 1, row: 3, endcol: 1, curscol: 1}, screenpos(1, 3, 1)) - call assert_equal(3, screenpos(1, 4, 1).row) - call assert_equal(3, screenpos(1, 5, 1).row) + call assert_equal(#{col: 1, row: 3, endcol: 1, curscol: 1}, screenpos(1, 4, 1)) + call assert_equal(#{col: 1, row: 3, endcol: 1, curscol: 1}, screenpos(1, 5, 1)) + setlocal number + call assert_equal(#{col: 5, row: 3, endcol: 5, curscol: 5}, screenpos(1, 3, 1)) + call assert_equal(#{col: 5, row: 3, endcol: 5, curscol: 5}, screenpos(1, 4, 1)) + call assert_equal(#{col: 5, row: 3, endcol: 5, curscol: 5}, screenpos(1, 5, 1)) call assert_equal(4, screenpos(1, 6, 1).row) bwipe! endfunc |