Skip to content

Commit da91b51

Browse files
committed
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 <[email protected]>
1 parent a67f269 commit da91b51

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

runtime/doc/pattern.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*pattern.txt* For Vim version 9.1. Last change: 2025 Sep 24
1+
*pattern.txt* For Vim version 9.1. Last change: 2025 Oct 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -141,7 +141,8 @@ CTRL-C Interrupt current (search) command. Use CTRL-Break on
141141
help users who use "vim file | grep word" and don't
142142
know how to get out (blindly typing :qa<CR> would
143143
work).
144-
If a popup is open, the active popup will be closed.
144+
If a popup with a |popup-filter| is open, the popup
145+
will be closed.
145146

146147
*:noh* *:nohlsearch*
147148
:noh[lsearch] Stop the highlighting for the 'hlsearch' option. It

runtime/doc/version9.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*version9.txt* For Vim version 9.1. Last change: 2025 Oct 04
1+
*version9.txt* For Vim version 9.1. Last change: 2025 Oct 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41760,7 +41760,6 @@ Others: ~
4176041760
- the putty terminal is detected using an |TermResponse| autocommand in
4176141761
|defaults.vim| and Vim switches to a dark background
4176241762
- improve the |vimtutor| and add a second chapter for more advanced tips
41763-
- |CTRL-C| always closes the active |popup-window|.
4176441763
- the configure script will favor using GTK3 over GTK2 when auto-detecting the
4176541764
gui toolkit
4176641765
- |gv| works in operator pending mode and does not abort

src/popupwin.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3622,20 +3622,6 @@ popup_do_filter(int c)
36223622
&& (wp->w_filter_mode & state) != 0)
36233623
res = invoke_popup_filter(wp, c);
36243624

3625-
// when Ctrl-C and no popup has been processed (res is still FALSE)
3626-
// Try to find and close a popup that has no filter callback
3627-
if (c == Ctrl_C && res == FALSE)
3628-
{
3629-
popup_reset_handled(POPUP_HANDLED_2);
3630-
wp = find_next_popup(FALSE, POPUP_HANDLED_2);
3631-
if (wp != NULL)
3632-
{
3633-
popup_close_with_retval(wp, -1);
3634-
res = TRUE;
3635-
}
3636-
}
3637-
3638-
36393625
if (must_redraw > was_must_redraw)
36403626
{
36413627
int save_got_int = got_int;

src/testdir/test_popupwin.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3931,7 +3931,7 @@ func Test_popupwin_cancel_with_without_filter()
39313931

39323932
call feedkeys("\<C-C>", 'xt')
39333933
call assert_equal({}, popup_getpos(win1))
3934-
call assert_equal({}, popup_getpos(win2))
3934+
call assert_equal(10, popup_getpos(win2).line)
39353935

39363936
call popup_clear()
39373937
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,8 @@ static char *(features[]) =
729729

730730
static int included_patches[] =
731731
{ /* Add new patch number below this line */
732+
/**/
733+
1826,
732734
/**/
733735
1825,
734736
/**/

0 commit comments

Comments
 (0)