Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/popupwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -3040,6 +3040,7 @@ popup_hide(win_T *wp)
if (wp->w_winrow + popup_height(wp) >= cmdline_row)
clear_cmdline = TRUE;
redraw_all_later(UPD_NOT_VALID);
status_redraw_all();
popup_mask_refresh = TRUE;
}

Expand Down Expand Up @@ -3203,6 +3204,7 @@ popup_free(win_T *wp)
#endif

redraw_all_later(UPD_NOT_VALID);
status_redraw_all();
popup_mask_refresh = TRUE;
}

Expand Down
15 changes: 15 additions & 0 deletions src/testdir/dumps/Test_popupwin_close_status_1.dump

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/testdir/dumps/Test_popupwin_close_status_2.dump

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions src/testdir/test_popupwin.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5063,4 +5063,26 @@ func Test_popup_opacity_vsplit()
call StopVimInTerminal(buf)
endfunc

func Test_popupwin_close_status_redraw()
CheckScreendump

let lines =<< trim END
split
call setline(1, range(1, 20))
let winid = popup_create('popup over statusline', #{
\ line: &lines / 2,
\ col: 5,
\ })
END
call writefile(lines, 'XtestPopupCloseStatus', 'D')
let buf = RunVimInTerminal('-S XtestPopupCloseStatus', #{rows: 15})
call VerifyScreenDump(buf, 'Test_popupwin_close_status_1', {})

" close the popup and check the status line is redrawn
call term_sendkeys(buf, ":call popup_close(winid)\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_close_status_2', {})

call StopVimInTerminal(buf)
endfunc

" vim: shiftwidth=2 sts=2
Loading