aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-23 06:35:40 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-02-23 06:39:05 +0800
commit06df895e71720b65f98b6b9c579ca5918a12bc04 (patch)
tree778d31bc4664128a2f21cf7925e918f5dd064a4f /test
parent20e4001eeedc80b1f2857fcaca81f7a211a09b40 (diff)
downloadrneovim-06df895e71720b65f98b6b9c579ca5918a12bc04.tar.gz
rneovim-06df895e71720b65f98b6b9c579ca5918a12bc04.tar.bz2
rneovim-06df895e71720b65f98b6b9c579ca5918a12bc04.zip
vim-patch:9.1.0126: Internal error when using upper-case mark in getregion()
Problem: Internal error when passing mark in another buffer to getregion(). Solution: Don't allow marks in another buffer (zeertzjq) closes: vim/vim#14076 Internal error when passing mark in another buffer to getregion() https://github.com/vim/vim/commit/421b597470c118871c7081de00dd065e0e000b7e
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_visual.vim11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/old/testdir/test_visual.vim b/test/old/testdir/test_visual.vim
index 084d64ba07..88f587a83a 100644
--- a/test/old/testdir/test_visual.vim
+++ b/test/old/testdir/test_visual.vim
@@ -1716,7 +1716,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