vim-patch:9.1.0166: Internal error with blockwise getregion() in another buffer (#27819)

Problem:  Internal error with blockwise getregion() in another buffer
Solution: Also change curwin->w_buffer when changing curbuf (zeertzjq)

closes: vim/vim#14179

5406eb8722
This commit is contained in:
zeertzjq
2024-03-12 07:19:30 +08:00
committed by GitHub
parent cf156377e8
commit 6481da3015
2 changed files with 12 additions and 18 deletions

View File

@@ -1772,11 +1772,11 @@ func Test_visual_getregion()
for type in ['v', 'V', "\<C-V>"]
for exclusive in [v:false, v:true]
call assert_equal(range(10)->mapnew('string(v:val)'),
\ getregion([g:buf, 1, 1, 0], [g:buf, 10, 2, 0]),
\ {'type': type, 'exclusive': exclusive })
\ getregion([g:buf, 1, 1, 0], [g:buf, 10, 2, 0],
\ {'type': type, 'exclusive': exclusive }))
call assert_equal(range(10)->mapnew('string(v:val)'),
\ getregion([g:buf, 10, 2, 0], [g:buf, 1, 1, 0]),
\ {'type': type, 'exclusive': exclusive })
\ getregion([g:buf, 10, 2, 0], [g:buf, 1, 1, 0],
\ {'type': type, 'exclusive': exclusive }))
endfor
endfor