forked from aniani/vim
patch 9.1.0388: cursor() and getregion() don't handle v:maxcol well
Problem: cursor() and getregion() don't handle v:maxcol well.
Solution: Add special handling for v:maxcol like setpos() does.
(zeertzjq)
closes: #14698
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
da9d345b3d
commit
2ffdae7948
@@ -1698,6 +1698,9 @@ func Test_visual_getregion()
|
||||
\ "'a"->getpos()->getregion(getpos("'a"), {'type': 'V' }))
|
||||
call assert_equal(['one', 'two'],
|
||||
\ "."->getpos()->getregion(getpos("'a"), {'type': "\<c-v>" }))
|
||||
call feedkeys("\<ESC>jVj\<ESC>", 'tx')
|
||||
call assert_equal(['two', 'three'], getregion(getpos("'<"), getpos("'>")))
|
||||
call assert_equal(['two', 'three'], getregion(getpos("'>"), getpos("'<")))
|
||||
|
||||
#" Using List
|
||||
call cursor(1, 1)
|
||||
|
||||
Reference in New Issue
Block a user