if (wp->w_buffer == buf)
redraw_win_later(wp, type);
}
+#ifdef FEAT_PROP_POPUP
+ // popup windows are not in the list of windows
+ FOR_ALL_POPUPWINS(wp)
+ if (wp->w_buffer == buf)
+ redraw_win_later(wp, type);
+ FOR_ALL_POPUPWINS_IN_TAB(curtab, wp)
+ if (wp->w_buffer == buf)
+ redraw_win_later(wp, type);
+#endif
#if defined(FEAT_TERMINAL) && defined(FEAT_PROP_POPUP)
// terminal in popup window is not in list of windows
if (curwin->w_buffer == buf)
--- /dev/null
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| |╔+0#0000001#ffd7ff255|═@29|╗| +0#4040ff13#ffffff0@40
+|~| |║+0#0000001#ffd7ff255|p|o|p|u|p| |t|e|x|t| @11|c+0&#ffff4012|o|u|n|t|=|1| |║+0&#ffd7ff255| +0#4040ff13#ffffff0@40
+|~| |╚+0#0000001#ffd7ff255|═@29|╝| +0#4040ff13#ffffff0@40
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|X|p|o|p|u|p|P|r|o|p|"| |[|N|e|w|]| @38|0|,|0|-|1| @8|A|l@1|
--- /dev/null
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| |╔+0#0000001#ffd7ff255|═@29|╗| +0#4040ff13#ffffff0@40
+|~| |║+0#0000001#ffd7ff255|p|o|p|u|p| |t|e|x|t| @11|c+0&#ffff4012|o|u|n|t|=|2| |║+0&#ffd7ff255| +0#4040ff13#ffffff0@40
+|~| |╚+0#0000001#ffd7ff255|═@29|╝| +0#4040ff13#ffffff0@40
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|X|p|o|p|u|p|P|r|o|p|"| |[|N|e|w|]| @38|0|,|0|-|1| @8|A|l@1|
call prop_type_delete('imgclipprop')
endfunc
+func Test_popupwin_textprop_redraw()
+ CheckScreendump
+
+ let lines =<< trim END
+ vim9script
+ var buf = bufadd('XpopupProp')
+ bufload(buf)
+ setbufline(buf, 1, 'popup text')
+ prop_type_add('counter', {bufnr: buf, highlight: 'Search'})
+ popup_create(buf, {line: 3, col: 3, minwidth: 30, border: []})
+
+ var counter = 0
+ def g:UpdateProp()
+ counter += 1
+ prop_remove({all: true, type: 'counter', bufnr: buf}, 1)
+ prop_add(1, 0, {
+ bufnr: buf,
+ type: 'counter',
+ text: $'count={counter} ',
+ text_align: 'right',
+ })
+ enddef
+ nnoremap <F3> <ScriptCmd>g:UpdateProp()<CR>
+ END
+ call writefile(lines, 'XtestPopupProp', 'D')
+ let buf = RunVimInTerminal('-S XtestPopupProp', #{rows: 10})
+
+ " Updating only the virtual text of the popup buffer must redraw the popup.
+ call term_sendkeys(buf, "\<F3>")
+ call VerifyScreenDump(buf, 'Test_popupwin_textprop_redraw_1', {})
+
+ call term_sendkeys(buf, "\<F3>")
+ call VerifyScreenDump(buf, 'Test_popupwin_textprop_redraw_2', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2