Mercurial > vim
diff src/window.c @ 17225:09fa437d33d8 v8.1.1612
patch 8.1.1612: cannot show an existing buffer in a popup window
commit https://github.com/vim/vim/commit/5b8cfedfbd19a71a30c73cf44b0aec3da7fc1a24
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 30 22:16:10 2019 +0200
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().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Jun 2019 22:30:05 +0200 |
parents | 4b40e8821f56 |
children | dfd87ef822aa |
line wrap: on
line diff
--- a/src/window.c +++ b/src/window.c @@ -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);