]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1826: Patch v9.1.1230 causes confusion about Ctrl-C behaviour v9.1.1826
authorChristian Brabandt <cb@256bit.org>
Sun, 5 Oct 2025 13:00:11 +0000 (13:00 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 5 Oct 2025 13:04:52 +0000 (13:04 +0000)
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 <cb@256bit.org>
runtime/doc/pattern.txt
runtime/doc/version9.txt
src/popupwin.c
src/testdir/test_popupwin.vim
src/version.c

index d726574885dc41b97f1d5a171e33f9a92ac649cd..57bcb2427770918739df8d9111cda9990be18f25 100644 (file)
@@ -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
index 2a4a2d07968658f47b88820a9a7db8988a98bd09..5e366cc48f502fa9f39fd631ec4c730562b2f285 100644 (file)
@@ -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
index 64f68377190f7e8b85323329f5eed0125f0274f4..99e3967469adb1b8f425742878679795ee8b1dab 100644 (file)
@@ -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;
index eca0a5a68f07456031a6629596a0ca6244faaeb0..129e14cd8b4095d00a75e61f39e0d0705998a483 100644 (file)
@@ -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
index 01a0dd08a52d7018d9582ede06ca98e9ac3b5e04..66800306457ca6ef9a53da1fd2e511f0da054e5f 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1826,
 /**/
     1825,
 /**/