]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0477: popup: leftover content after popup_free under layout change v9.2.0477
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Tue, 12 May 2026 17:47:41 +0000 (17:47 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 12 May 2026 17:47:41 +0000 (17:47 +0000)
commit3a9e1bb7e245f862f506b02845fc6132013ef6e7
tree77d72338a39bd1fe34561f2fc43c853451c3d89c
parent38237411e4e202a96b0efe41567505331114bfa8
patch 9.2.0477: popup: leftover content after popup_free under layout change

Problem:  popup_mask still marks the freed popup's cells as covered
          until may_update_popup_mask() runs inside the next
          update_screen.  Any screen_fill / screen_puts called in
          between (for example msg_clr_eos triggered by a status message
          from :copen) hits skip_for_popup() and silently drops writes
          to those cells, so the popup's chars survive on screen until
          those cells happen to be redrawn for another reason.
Solution: Add popup_clear_mask_for() and call it from popup_hide() and
          popup_free() when the popup was visible, so the upcoming
          writes take effect immediately (Yasuhiro Matsumoto)

Note: The test is limited to MS-Windows because the original report
      (#20178) was reproduced there and the redraw timing required to
      surface the bug differs on other platforms.

fixes:  #20178
closes: #20188

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/popupwin.c
src/testdir/test_popupwin.vim
src/version.c