mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.2.3494: illegal memory access in utf_head_off
Problem: Illegal memory access in utf_head_off. Solution: Check cursor position when reselecting the Visual area. (closes #8963)
This commit is contained in:
@@ -1265,5 +1265,25 @@ func Test_visual_block_with_virtualedit()
|
||||
call delete('XTest_block')
|
||||
endfunc
|
||||
|
||||
func Test_visual_reselect_with_count()
|
||||
" this was causing an illegal memory access
|
||||
let lines =<< trim END
|
||||
|
||||
|
||||
|
||||
:
|
||||
r<sfile>
|
||||
exe "%norm e3\<c-v>kr\t"
|
||||
:
|
||||
|
||||
:
|
||||
END
|
||||
call writefile(lines, 'XvisualReselect')
|
||||
source XvisualReselect
|
||||
|
||||
bwipe!
|
||||
call delete('XvisualReselect')
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user