forked from aniani/vim
patch 8.2.3969: value of MAXCOL not available in Vim script
Problem: Value of MAXCOL not available in Vim script. Solution: Add v:maxcol. (Naohiro Ono, closes #9451)
This commit is contained in:
committed by
Bram Moolenaar
parent
e70cec9760
commit
56200eed62
@@ -38,6 +38,18 @@ func Test_move_cursor()
|
||||
quit!
|
||||
endfunc
|
||||
|
||||
func Test_curswant_maxcol()
|
||||
new
|
||||
call setline(1, 'foo')
|
||||
|
||||
" Test that after "$" command curswant is set to the same value as v:maxcol.
|
||||
normal! 1G$
|
||||
call assert_equal(v:maxcol, getcurpos()[4])
|
||||
call assert_equal(v:maxcol, winsaveview().curswant)
|
||||
|
||||
quit!
|
||||
endfunc
|
||||
|
||||
" Very short version of what matchparen does.
|
||||
function s:Highlight_Matching_Pair()
|
||||
let save_cursor = getcurpos()
|
||||
|
||||
Reference in New Issue
Block a user