patch 8.2.1237: changing 'completepopup' after opening popup has no effect
Problem: Changing 'completepopup' after opening a popup has no effect. (Jay
Sitter)
Solution: Close the popup when the options are changed. (closes #6471)
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_8.dump b/src/testdir/dumps/Test_popupwin_infopopup_8.dump
new file mode 100644
index 0000000..6838bcd
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_infopopup_8.dump
@@ -0,0 +1,14 @@
+|a+0&#ffffff0|w|o|r|d| @69
+|t|e|s|t| |t|a|w|o|r|d> @63
+|~+0#4040ff13&| @3| +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| @1| +0#0000000#0000001| +0#0000001#e0e0e08|w|o|r|d|s| |a|r|e| |c|o@1|l| | +0#4040ff13#ffffff0@29
+|~| @3| +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| @1| +0#0000000#0000001| +0#4040ff13#ffffff0@45
+|~| @3| +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| @1| +0#0000000#a8a8a8255| +0#4040ff13#ffffff0@45
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| |(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@26
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 8df01e1..054d479 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -3109,6 +3109,12 @@
call term_sendkeys(buf, "otest text test text\<C-X>\<C-U>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_7', {})
+ " Test that when the option is changed the popup changes.
+ call term_sendkeys(buf, "\<Esc>")
+ call term_sendkeys(buf, ":set completepopup=border:off\<CR>")
+ call term_sendkeys(buf, "a\<C-X>\<C-U>")
+ call VerifyScreenDump(buf, 'Test_popupwin_infopopup_8', {})
+
call term_sendkeys(buf, "\<Esc>")
call StopVimInTerminal(buf)
call delete('XtestInfoPopup')