[vim/vim] Popup with opacity and border and modified content is not cleared (Issue #20459)

1 view
Skip to first unread message

Nick Jensen

unread,
7:01 PM (4 hours ago) 7:01 PM
to vim/vim, Subscribed
nickspoons created an issue (vim/vim#20459)

Steps to reproduce

In some circumstances, modifying a popup content results in some parts of the popup not being cleared properly from the screen. It appears to be a combination of an opacity value < 100, no popup highlight, and a border, in combination with a popup_settext() call.

Run following shell command:

cat <<'EOF' > /tmp/popup_err.vim ; vim -Nu NONE -S /tmp/popup_err.vim /tmp/popup_err.vim
vim9script

# leftover elements of the small popup remain here:




#  ^^^

var content_small = [ 'abc', 'ABC', '123', '456' ]
var content_large = [ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '', '', '', '', '.' ]

var pwinid = popup_create(content_small, {
  line: 2,
  col: 2,
  border: [],
  highlight: 'None',
  opacity: 50
})

timer_start(1000, (_) => popup_settext(pwinid, content_large))
timer_start(2000, (_) => popup_clear())
EOF

As can be seen in this screenshot, part of the popup remains in the display after the popup has been closed:

image.png (view on web)

Note that the error is not occurring at the popup_clear() call but at the popup_settext() call. After the popup content is modified, the larger popup still contains part of the smaller popup:

image.png (view on web)

Expected behaviour

The popup should be properly cleared.

Version of Vim

9.2.0612

Environment

Linux (Pop_OS! 22.04), multiple terminals

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20459@github.com>

Reply all
Reply to author
Forward
0 new messages