1
0
forked from aniani/vim

patch 8.2.5002: deletebufline() may change Visual selection

Problem:    deletebufline() may change Visual selection.
Solution:   Disable Visual mode when using another buffer. (closes #10469)
This commit is contained in:
LemonBoy
2022-05-22 15:35:53 +01:00
committed by Bram Moolenaar
parent 8a3704723c
commit 9b2edfd3bf
3 changed files with 22 additions and 0 deletions

View File

@@ -238,4 +238,21 @@ func Test_setbufline_select_mode()
bwipe!
endfunc
func Test_deletebufline_select_mode()
new
call setline(1, ['foo', 'bar'])
call feedkeys("j^v2l\<C-G>", 'nx')
let bufnr = bufadd('Xdummy')
call bufload(bufnr)
call setbufline(bufnr, 1, ['abc', 'def'])
call deletebufline(bufnr, 1)
call feedkeys("x", 'nx')
call assert_equal(['foo', 'x'], getline(1, 2))
exe "bwipe! " .. bufnr
bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab