aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-01 15:38:54 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-01 21:54:18 +0800
commit9cebfbe6abf41cdbb501a3acf9857b1d34c1cffc (patch)
treecf3a4d875ca6bbec4872c549e609fc3e4bae4bbb
parent34e7dc5d051918dc9df3d7bd8309a9a4974e7874 (diff)
downloadrneovim-9cebfbe6abf41cdbb501a3acf9857b1d34c1cffc.tar.gz
rneovim-9cebfbe6abf41cdbb501a3acf9857b1d34c1cffc.tar.bz2
rneovim-9cebfbe6abf41cdbb501a3acf9857b1d34c1cffc.zip
vim-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 vim/vim#10294) https://github.com/vim/vim/commit/2c8a7ebdad9da017bfb6dc8a0f46acea77ec2e17 N/A patches for version.c: vim-patch:8.2.0832: compiler warning for uninitialized variable Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) Solution: Add initial value. https://github.com/vim/vim/commit/a55ba06f6904af3d6a78fc90358cf72d4f2e8450
-rw-r--r--src/nvim/testdir/test_maparg.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_maparg.vim b/src/nvim/testdir/test_maparg.vim
index 0bade1df7f..dad4c81a7b 100644
--- a/src/nvim/testdir/test_maparg.vim
+++ b/src/nvim/testdir/test_maparg.vim
@@ -85,6 +85,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
@@ -93,6 +99,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
func Test_mapcheck()