int org_height = wp->w_height;
int org_leftcol = wp->w_leftcol;
int org_leftoff = wp->w_popup_leftoff;
+ int org_has_scrollbar = wp->w_has_scrollbar;
int minwidth, minheight;
int maxheight = Rows;
int wantline = wp->w_wantline; // adjusted for textprop
|| org_leftcol != wp->w_leftcol
|| org_leftoff != wp->w_popup_leftoff
|| org_width != wp->w_width
- || org_height != wp->w_height)
+ || org_height != wp->w_height
+ || org_has_scrollbar != wp->w_has_scrollbar)
{
redraw_win_later(wp, UPD_NOT_VALID);
if (wp->w_popup_flags & POPF_ON_CMDLINE)
--- /dev/null
+> +0&#ffffff0@49
+|~+0#4040ff13&| @48
+|~| @2|╔+0#0000001#ffd7ff255|═@30|╗| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|║+0#0000001#ffd7ff255|h|e|l@1|o| |w|o|r|l|d| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#4040ff13#ffffff0@12
+|~| @2|╚+0#0000001#ffd7ff255|═@30|╝| +0#4040ff13#ffffff0@12
+| +0#0000000&@31|0|,|0|-|1| @8|A|l@1|
--- /dev/null
+> +0&#ffffff0@49
+|~+0#4040ff13&| @48
+|~| @2|╔+0#0000001#ffd7ff255|═@29|╗| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255|s|h|o|r|t| @24|║| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|║+0#0000001#ffd7ff255| +0#4040ff13&@29|║+0#0000001&| +0#4040ff13#ffffff0@13
+|~| @2|╚+0#0000001#ffd7ff255|═@29|╝| +0#4040ff13#ffffff0@13
+|:+0#0000000&|c|a|l@1| |p|o|p|u|p|_|s|e|t@1|e|x|t|(|g|:|p|,| |[|'|s|h|o|r|t|0|,|0|-|1| @8|A|l@1|
call StopVimInTerminal(buf)
endfunc
+func Test_popup_settext_scrollbar_disappear()
+ CheckScreendump
+
+ let lines =<< trim END
+ let g:p = popup_create(repeat(['hello world'], 30), #{
+ \ line: 3,
+ \ col: 5,
+ \ pos: 'topleft',
+ \ minheight: 10,
+ \ maxheight: 10,
+ \ minwidth: 30,
+ \ border: [1, 1, 1, 1],
+ \ })
+ END
+ call writefile(lines, 'XtestPopupScrollDisappear', 'D')
+ let buf = RunVimInTerminal('-S XtestPopupScrollDisappear', #{rows: 15, cols: 50})
+ call VerifyScreenDump(buf, 'Test_popup_settext_scrollbar_disappear_1', {})
+
+ " Shrinking the buffer makes the scrollbar disappear. The right border
+ " column must not leave stray characters where the scrollbar used to be.
+ call term_sendkeys(buf, ":call popup_settext(g:p, ['short'])\<CR>")
+ call VerifyScreenDump(buf, 'Test_popup_settext_scrollbar_disappear_2', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_popup_settext_getline()
let id = popup_create('', #{ tabpage: 0 })
call popup_settext(id, ['a','b'])
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 422,
/**/
421,
/**/