diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-22 19:48:06 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-02-22 19:48:06 +0100 |
commit | 421b597470c118871c7081de00dd065e0e000b7e (patch) | |
tree | 468685895448cd96be6befa3e1df9cda1ed72a3d /src/testdir | |
parent | 1624970d321cfb637ac76232df9c9b3f2fae904c (diff) |
patch 9.1.0126: Internal error when using upper-case mark in getregion()v9.1.0126
Problem: Internal error when passing mark in another buffer to
getregion().
Solution: Don't allow marks in another buffer (zeertzjq)
closes: #14076
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Internal error when passing mark in another buffer to getregion()
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_visual.vim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index 34c572e617..8b434238a8 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -1712,7 +1712,16 @@ func Test_visual_getregion() call assert_fails(':echo "."->getregion([],"V")', 'E1174:') call assert_fails(':echo "."->getregion("$", {})', 'E1174:') call assert_fails(':echo [0, 1, 1, 0]->getregion("$", "v")', 'E1174:') - + " using a mark in another buffer + new + let newbuf = bufnr() + call setline(1, range(10)) + normal! GmA + wincmd p + call assert_equal([newbuf, 10, 1, 0], getpos("'A")) + call assert_equal([], getregion(".", "'A", 'v')) + call assert_equal([], getregion("'A", ".", 'v')) + exe newbuf .. 'bwipe!' bwipe! " Selection in starts or ends in the middle of a multibyte character |