Patch 8.2.0421
Problem: Interrupting with CTRL-C does not always work.
Solution: Recognize CTRL-C while modifyOtherKeys is set.
Files: src/ui.c, src/testdir/test_vim9_script.vim, src/evalfunc.c
*** ../vim-8.2.0420/src/ui.c 2020-01-26 21:59:25.632718110 +0100
--- src/ui.c 2020-03-20 20:35:11.445994721 +0100
***************
*** 2280,2286 ****
for (try = 0; try < 100; ++try)
{
size_t readlen = (size_t)((INBUFLEN - inbufcount)
! / input_conv.vc_factor);
# ifdef VMS
len = vms_read((char *)inbuf + inbufcount, readlen);
# else
--- 2280,2286 ----
for (try = 0; try < 100; ++try)
{
size_t readlen = (size_t)((INBUFLEN - inbufcount)
! / input_conv.vc_factor);
# ifdef VMS
len = vms_read((char *)inbuf + inbufcount, readlen);
# else
***************
*** 2344,2352 ****
while (len-- > 0)
{
/*
! * if a CTRL-C was typed, remove it from the buffer and set got_int
*/
! if (inbuf[inbufcount] == 3 && ctrl_c_interrupts)
{
// remove everything typed before the CTRL-C
mch_memmove(inbuf, inbuf + inbufcount, (size_t)(len + 1));
--- 2344,2355 ----
while (len-- > 0)
{
/*
! * If a CTRL-C was typed, remove it from the buffer and set
! * got_int. Also recognize CTRL-C with modifyOtherKeys set.
*/
! if (ctrl_c_interrupts && (inbuf[inbufcount] == 3
! || (len >= 9 && STRNCMP(inbuf + inbufcount,
! "\e[27;5;99~", 10) == 0)))
{
// remove everything typed before the CTRL-C
mch_memmove(inbuf, inbuf + inbufcount, (size_t)(len + 1));
*** ../vim-8.2.0420/src/testdir/test_vim9_script.vim 2020-03-20
19:37:26.550539660 +0100
--- src/testdir/test_vim9_script.vim 2020-03-20 20:38:39.821749706 +0100
***************
*** 942,956 ****
assert_equal('1_3_', result)
enddef
! " def Test_interrupt_loop()
! " let x = 0
! " while 1
! " x += 1
! " if x == 100
! " feedkeys("\<C-C>", 'L')
! " endif
! " endwhile
! " enddef
def Test_substitute_cmd()
new
--- 942,956 ----
assert_equal('1_3_', result)
enddef
! def Test_interrupt_loop()
! let x = 0
! while 1
! x += 1
! if x == 100
! feedkeys("\<C-C>", 'Lt')
! endif
! endwhile
! enddef
def Test_substitute_cmd()
new
*** ../vim-8.2.0420/src/evalfunc.c 2020-03-16 21:08:28.581879755 +0100
--- src/evalfunc.c 2020-03-20 20:38:30.277762553 +0100
***************
*** 2472,2478 ****
if (lowlevel)
{
#ifdef USE_INPUT_BUF
! add_to_input_buf(keys, (int)STRLEN(keys));
#else
emsg(_("E980: lowlevel input not supported"));
#endif
--- 2472,2488 ----
if (lowlevel)
{
#ifdef USE_INPUT_BUF
! int idx;
! int len = (int)STRLEN(keys);
!
! for (idx = 0; idx < len; ++idx)
! {
! // if a CTRL-C was typed, set got_int, similar to what
! // happens in fill_input_buf()
! if (keys[idx] == 3 && ctrl_c_interrupts && typed)
! got_int = TRUE;
! add_to_input_buf(keys + idx, 1);
! }
#else
emsg(_("E980: lowlevel input not supported"));
#endif
*** ../vim-8.2.0420/src/version.c 2020-03-20 19:37:26.554539638 +0100
--- src/version.c 2020-03-20 20:25:29.369987470 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 421,
/**/
--
You got to work at a mill? Lucky! I got sent back to work in the
acid-mines for my daily crust of stale bread... which not even the
birds would eat.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202003201949.02KJnMjV020219%40masaka.moolenaar.net.