mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.1612: cannot show an existing buffer in a popup window
Problem: Cannot show an existing buffer in a popup window. Solution: Support buffer number argument in popup_create().
This commit is contained in:
@@ -4887,7 +4887,7 @@ win_free(
|
||||
int
|
||||
win_unlisted(win_T *wp)
|
||||
{
|
||||
return wp == aucmd_win || bt_popup(wp->w_buffer);
|
||||
return wp == aucmd_win || WIN_IS_POPUP(wp);
|
||||
}
|
||||
|
||||
#if defined(FEAT_TEXT_PROP) || defined(PROTO)
|
||||
@@ -4898,7 +4898,10 @@ win_unlisted(win_T *wp)
|
||||
void
|
||||
win_free_popup(win_T *win)
|
||||
{
|
||||
win_close_buffer(win, DOBUF_WIPE, FALSE);
|
||||
if (bt_popup(win->w_buffer))
|
||||
win_close_buffer(win, DOBUF_WIPE, FALSE);
|
||||
else
|
||||
close_buffer(win, win->w_buffer, 0, FALSE);
|
||||
# if defined(FEAT_TIMERS)
|
||||
if (win->w_popup_timer != NULL)
|
||||
stop_timer(win->w_popup_timer);
|
||||
@@ -6605,7 +6608,7 @@ restore_win_noblock(
|
||||
curbuf = curwin->w_buffer;
|
||||
}
|
||||
#ifdef FEAT_TEXT_PROP
|
||||
else if (bt_popup(curwin->w_buffer))
|
||||
else if (WIN_IS_POPUP(curwin))
|
||||
// original window was closed and now we're in a popup window: Go
|
||||
// to the first valid window.
|
||||
win_goto(firstwin);
|
||||
|
Reference in New Issue
Block a user