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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user