forked from aniani/vim
patch 8.2.5019: cannot get the first screen column of a character
Problem: Cannot get the first screen column of a character. Solution: Let virtcol() optionally return a list. (closes #10482, closes #7964)
This commit is contained in:
@@ -2947,4 +2947,15 @@ func Test_exepath()
|
||||
endif
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user