Mercurial > vim
diff src/testdir/test_registers.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 | 4e8ba4866760 |
children |
line wrap: on
line diff
--- a/src/testdir/test_registers.vim +++ b/src/testdir/test_registers.vim @@ -261,6 +261,19 @@ func Test_zz_recording_with_select_mode_ call Run_test_recording_with_select_mode_utf8() endfunc +func Test_recording_with_super_mod() + if "\<D-j>"[-1:] == '>' + throw 'Skipped: <D- modifier not supported' + endif + + nnoremap <D-j> <Ignore> + let s = repeat("\<D-j>", 1000) + " This used to crash Vim + call feedkeys($'qr{s}q', 'tx') + call assert_equal(s, @r) + nunmap <D-j> +endfunc + " Test for executing the last used register (@) func Test_last_used_exec_reg() " Test for the @: command