summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-17 20:05:45 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-17 20:05:45 +0200
commitad24a71e2248e839c875c0bc0e6ad3dbeea16998 (patch)
tree2f8299092999d13d75f8b248d1f21e5274e774ff
parentae943150d3a2868a89df802c9f530331474451ec (diff)
patch 8.1.1562: popup window not always redrawn after popup_setoptions()v8.1.1562
Problem: Popup window not always redrawn after popup_setoptions(). Solution: Force a redraw.
-rw-r--r--src/popupwin.c1
-rw-r--r--src/testdir/dumps/Test_popupwin_23.dump12
-rw-r--r--src/testdir/test_popupwin.vim6
-rw-r--r--src/version.c2
4 files changed, 20 insertions, 1 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index d777ae582a..b1c9840d26 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1449,6 +1449,7 @@ f_popup_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
apply_move_options(wp, dict);
apply_general_options(wp, dict);
+ popup_mask_refresh = TRUE;
popup_adjust_position(wp);
}
diff --git a/src/testdir/dumps/Test_popupwin_23.dump b/src/testdir/dumps/Test_popupwin_23.dump
new file mode 100644
index 0000000000..737d8f1bad
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_23.dump
@@ -0,0 +1,12 @@
+>1+0&#ffffff0| @73
+|2| |╔+0&#5fd7ff255|═@11|╗| +0&#ffffff0@5|╔+0&#dadada255|═@11|╗+0&#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255@13| +0&#ffffff0@2|#+0&#5fd7ff255|x@11|#| +0&#ffffff0@1
+|3| |║+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|║+0#0000000#5fd7ff255| +0&#ffffff0@5|║+0&#a8a8a8255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|║+0#0000000#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|x+0#0000000#5fd7ff255| +0&#ffffff0@2|x+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|x+0#0000000#5fd7ff255| +0&#ffffff0@1
+|4| |╚+0&#5fd7ff255|═@11|╝| +0&#ffffff0@5|║+0&#a8a8a8255|a+0#0000001#ffd7ff255|n|d| |m|o|r|e| @3|║+0#0000000#8a8a8a255| +0&#ffffff0@5|x+0&#5fd7ff255|l+0#0000001#ffd7ff255|i|n|e|s| |o|n|l|y| @1|x+0#0000000#5fd7ff255| +0&#ffffff0@2|x+0&#5fd7ff255|w+0#0000001#ffd7ff255|i|t|h| |c|o|r|n|e|r|s|x+0#0000000#5fd7ff255| +0&#ffffff0@1
+|5| @20|╚+0&#585858255|═@11|╝| +0&#ffffff0@5|x+0&#5fd7ff255@13| +0&#ffffff0@2|#+0&#5fd7ff255|x@11|#| +0&#ffffff0@1
+|6| |e+0&#5fd7ff255|a@11|f| +0&#ffffff0@58
+|7| |d+0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r|b+0#0000000#5fd7ff255| +0&#ffffff0@5| +0&#5fd7ff255@13| +0&#ffffff0@38
+|8| |d+0&#5fd7ff255|w+0#0000001#ffd7ff255|i|t|h| |n|u|m|b|e|r|s|b+0#0000000#5fd7ff255| +0&#ffffff0@5| +0&#5fd7ff255|h+0#0000001#ffd7ff255|e|l@1|o| |b|o|r|d|e|r| +0#0000000#5fd7ff255| +0&#ffffff0@38
+|9| |h+0&#5fd7ff255|c@11|g| +0&#ffffff0@5| +0&#5fd7ff255|j+0#0000001#ffd7ff255|u|s|t| |b|l|a|n|k|s| | +0#0000000#5fd7ff255| +0&#ffffff0@38
+|1|0| @19| +0&#5fd7ff255@13| +0&#ffffff0@38
+|1@1| @72
+@57|1|,|1| @10|T|o|p|
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index f16a46f261..7d723a0662 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -108,12 +108,16 @@ func Test_popup_with_border_and_padding()
\ "call popup_create(['hello border', 'and more'], {'line': 2, 'col': 23, 'border': [], 'borderhighlight': ['TopColor', 'RightColor', 'BottomColor', 'LeftColor']})",
\ "call popup_create(['hello border', 'lines only'], {'line': 2, 'col': 43, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': ['x']})",
\ "call popup_create(['hello border', 'with corners'], {'line': 2, 'col': 60, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': ['x', '#']})",
- \ "call popup_create(['hello border', 'with numbers'], {'line': 6, 'col': 3, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': ['0', '1', '2', '3', '4', '5', '6', '7']})",
+ \ "let winid = popup_create(['hello border', 'with numbers'], {'line': 6, 'col': 3, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': ['0', '1', '2', '3', '4', '5', '6', '7']})",
\ "call popup_create(['hello border', 'just blanks'], {'line': 7, 'col': 23, 'border': [], 'borderhighlight': ['BlueColor'], 'borderchars': [' ']})",
\], 'XtestPopupBorder')
let buf = RunVimInTerminal('-S XtestPopupBorder', {'rows': 12})
call VerifyScreenDump(buf, 'Test_popupwin_22', {})
+ " check that changing borderchars triggers a redraw
+ call term_sendkeys(buf, ":call popup_setoptions(winid, {'borderchars': ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']})\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_23', {})
+
call StopVimInTerminal(buf)
call delete('XtestPopupBorder')
diff --git a/src/version.c b/src/version.c
index feac0855be..f82f3c5b34 100644
--- a/src/version.c
+++ b/src/version.c
@@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1562,
+/**/
1561,
/**/
1560,