1
0
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:
naohiro ono
2022-01-01 14:59:44 +00:00
committed by Bram Moolenaar
parent e70cec9760
commit 56200eed62
8 changed files with 40 additions and 15 deletions

View File

@@ -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()