comparison src/testdir/test_mapping.vim @ 35028:59d23ae7dbb0 v9.1.0365

patch 9.1.0365: Crash when typing many keys with D- modifier Commit: https://github.com/vim/vim/commit/6b13e3d4e46393b3a35eed7c27ae020bcbd46a9b Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Apr 22 21:04:29 2024 +0200 patch 9.1.0365: Crash when typing many keys with D- modifier Problem: Crash when typing many keys with D- modifier (after 9.1.0227). Solution: Don't treat a 0x80 byte inside a special sequence as the start of a special sequence (zeertzjq). closes: #14613 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 22 Apr 2024 21:15:07 +0200
parents ca76febc62fc
children 2156e8b7e7d4
comparison
equal deleted inserted replaced
35027:1cc0ed91d423 35028:59d23ae7dbb0
246 call assert_match('i <M-á>\s*foo', execute('imap')) 246 call assert_match('i <M-á>\s*foo', execute('imap'))
247 iunmap <M-á> 247 iunmap <M-á>
248 endfunc 248 endfunc
249 249
250 func Test_map_super_quotes() 250 func Test_map_super_quotes()
251 if has('gui_gtk') || has('gui_gtk3') || has("macos") 251 if "\<D-j>"[-1:] == '>'
252 imap <D-"> foo 252 throw 'Skipped: <D- modifier not supported'
253 call feedkeys("Go-\<*D-\">-\<Esc>", "xt")
254 call assert_equal("-foo-", getline('$'))
255 set nomodified
256 iunmap <D-">
257 endif 253 endif
254
255 imap <D-"> foo
256 call feedkeys("Go-\<*D-\">-\<Esc>", "xt")
257 call assert_equal("-foo-", getline('$'))
258 set nomodified
259 iunmap <D-">
258 endfunc 260 endfunc
259 261
260 func Test_map_super_multibyte() 262 func Test_map_super_multibyte()
261 if has('gui_gtk') || has('gui_gtk3') || has("macos") 263 if "\<D-j>"[-1:] == '>'
262 imap <D-á> foo 264 throw 'Skipped: <D- modifier not supported'
263 call assert_match('i <D-á>\s*foo', execute('imap'))
264 iunmap <D-á>
265 endif 265 endif
266
267 imap <D-á> foo
268 call assert_match('i <D-á>\s*foo', execute('imap'))
269 iunmap <D-á>
266 endfunc 270 endfunc
267 271
268 func Test_abbr_after_line_join() 272 func Test_abbr_after_line_join()
269 new 273 new
270 abbr foo bar 274 abbr foo bar