patch 9.1.1826: Patch v9.1.1230 causes confusion about Ctrl-C behaviour
Commit:
https://github.com/vim/vim/commit/da91b5135fdd8aa0da9e38b39fe1174dd3b878a1
Author: Christian Brabandt <
c...@256bit.org>
Date: Sun Oct 5 13:00:11 2025 +0000
patch 9.1.1826: Patch v9.1.1230 causes confusion about Ctrl-C behaviour
Problem: Patch v9.1.1230 causes confusion about Ctrl-C behaviour
(kuuote, after v9.1.1230)
Solution: Revert the behaviour, keep the old behaviour
fixes: #17266
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index d72657488..57bcb2427 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 9.1. Last change: 2025 Sep 24
+*pattern.txt* For Vim version 9.1. Last change: 2025 Oct 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -141,7 +141,8 @@ CTRL-C Interrupt current (search) command. Use CTRL-Break on
help users who use "vim file | grep word" and don't
know how to get out (blindly typing :qa<CR> would
work).
- If a popup is open, the active popup will be closed.
+ If a popup with a |popup-filter| is open, the popup
+ will be closed.
*:noh* *:nohlsearch*
:noh[lsearch] Stop the highlighting for the 'hlsearch' option. It
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index 2a4a2d079..5e366cc48 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -1,4 +1,4 @@
-*version9.txt* For Vim version 9.1. Last change: 2025 Oct 04
+*version9.txt* For Vim version 9.1. Last change: 2025 Oct 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41760,7 +41760,6 @@ Others: ~
- the putty terminal is detected using an |TermResponse| autocommand in
|defaults.vim| and Vim switches to a dark background
- improve the |vimtutor| and add a second chapter for more advanced tips
-- |CTRL-C| always closes the active |popup-window|.
- the configure script will favor using GTK3 over GTK2 when auto-detecting the
gui toolkit
- |gv| works in operator pending mode and does not abort
diff --git a/src/popupwin.c b/src/popupwin.c
index 64f683771..99e396746 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -3622,20 +3622,6 @@ popup_do_filter(int c)
&& (wp->w_filter_mode & state) != 0)
res = invoke_popup_filter(wp, c);
- // when Ctrl-C and no popup has been processed (res is still FALSE)
- // Try to find and close a popup that has no filter callback
- if (c == Ctrl_C && res == FALSE)
- {
- popup_reset_handled(POPUP_HANDLED_2);
- wp = find_next_popup(FALSE, POPUP_HANDLED_2);
- if (wp != NULL)
- {
- popup_close_with_retval(wp, -1);
- res = TRUE;
- }
- }
-
-
if (must_redraw > was_must_redraw)
{
int save_got_int = got_int;
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index eca0a5a68..129e14cd8 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -3931,7 +3931,7 @@ func Test_popupwin_cancel_with_without_filter()
call feedkeys("\<C-C>", 'xt')
call assert_equal({}, popup_getpos(win1))
- call assert_equal({}, popup_getpos(win2))
+ call assert_equal(10, popup_getpos(win2).line)
call popup_clear()
endfunc
diff --git a/src/version.c b/src/version.c
index 01a0dd08a..668003064 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1826,
/**/
1825,
/**/