diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-25 22:22:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 22:22:26 +0800 |
commit | bfa92d3861e425b59f9b1793c08247965a8e53f5 (patch) | |
tree | 349d8b96c0f34a37589ecc787e3c33a901dee85d /test | |
parent | 43c49746d9cf82dba0d56b07d39722f9ebeecf90 (diff) | |
download | rneovim-bfa92d3861e425b59f9b1793c08247965a8e53f5.tar.gz rneovim-bfa92d3861e425b59f9b1793c08247965a8e53f5.tar.bz2 rneovim-bfa92d3861e425b59f9b1793c08247965a8e53f5.zip |
vim-patch:8.2.5019: cannot get the first screen column of a character (#23312)
Problem: Cannot get the first screen column of a character.
Solution: Let virtcol() optionally return a list. (closes vim/vim#10482,
closes vim/vim#7964)
https://github.com/vim/vim/commit/0f7a3e1de6f71e8e1423fe594890d6aa7f94e132
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_functions.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index 78eab3aaa5..a1f34ea8b6 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -2607,4 +2607,15 @@ func Test_builtin_check() endfunc +" Test for virtcol() +func Test_virtcol() + enew! + call setline(1, "the\tquick\tbrown\tfox") + norm! 4| + call assert_equal(8, virtcol('.')) + call assert_equal(8, virtcol('.', v:false)) + call assert_equal([4, 8], virtcol('.', v:true)) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |