mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.4831: crash when using maparg() and unmapping simplified keys
Problem: Crash when using maparg() and unmapping simplified keys. Solution: Do not keep a mapblock pointer. (closes #10294)
This commit is contained in:
@@ -74,6 +74,12 @@ func Test_maparg()
|
||||
call assert_equal(['{', 'w', 's'], [d.lhs, d.rhs, d.mode])
|
||||
sunmap {
|
||||
|
||||
map <C-I> foo
|
||||
unmap <Tab>
|
||||
" This used to cause a segfault
|
||||
call maparg('<C-I>', '', 0, 1)
|
||||
unmap <C-I>
|
||||
|
||||
map abc <Nop>
|
||||
call assert_equal("<Nop>", maparg('abc'))
|
||||
unmap abc
|
||||
@@ -82,6 +88,7 @@ func Test_maparg()
|
||||
let d = maparg('esc', 'i', 1, 1)
|
||||
call assert_equal(['esc', "\<C-V>\<C-V>\<Esc>", '!'], [d.lhs, d.rhs, d.mode])
|
||||
abclear
|
||||
unlet d
|
||||
endfunc
|
||||
|
||||
def Test_vim9_maparg()
|
||||
|
Reference in New Issue
Block a user