patch 8.2.1415: closing a popup window with CTRL-C interrupts 'statusline'
Problem: Closing a popup window with CTRL-C interrupts 'statusline' if it
calls a function.
Solution: Reset got_int while redrawing. (closes #6675)
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index f13a7e0..6ec4ef2 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -3479,6 +3479,31 @@
unlet g:bytes
endfunc
+func Test_popupwin_filter_close_ctrl_c()
+ CheckScreendump
+
+ let lines =<< trim END
+ vsplit
+ set laststatus=2
+ set statusline=%!Statusline()
+
+ function Statusline() abort
+ return '%<%f %h%m%r%=%-14.(%l,%c%V%) %P'
+ endfunction
+
+ call popup_create('test test test test...', {'filter': {-> 0}})
+ END
+ call writefile(lines, 'XtestPopupCtrlC')
+
+ let buf = RunVimInTerminal('-S XtestPopupCtrlC', #{rows: 10})
+
+ call term_sendkeys(buf, "\<C-C>")
+ call VerifyScreenDump(buf, 'Test_popupwin_ctrl_c', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XtestPopupCorners')
+endfunc
+
func Test_popupwin_atcursor_far_right()
new