1
0
forked from aniani/vim

patch 9.1.0051: MS-Windows: Key event test fail

Problem:  MS-Windows: Key event test fail
          (after 9.1.0050)
Solution: Catch Interrupt and return Ctrl-C

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-01-25 20:44:49 +01:00
parent 046a0f75d0
commit f6ebaa7ae6
3 changed files with 33 additions and 16 deletions

View File

@@ -1708,7 +1708,11 @@ func Test_gui_lowlevel_keyevent()
" Test for <Ctrl-A> to <Ctrl-Z> keys
for kc in range(65, 90)
call SendKeys([0x11, kc])
let ch = getcharstr()
try
let ch = getcharstr()
catch /^Vim:Interrupt$/
let ch = "\<c-c>"
endtry
call assert_equal(nr2char(kc - 64), ch)
endfor