diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-30 22:16:10 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-30 22:16:10 +0200 |
commit | 5b8cfedfbd19a71a30c73cf44b0aec3da7fc1a24 (patch) | |
tree | fdaa4dec72d804fdbaab665d550dc10b3be0dafb /src/window.c | |
parent | 892ae723ab95e429222e930cf41b32809567e58e (diff) | |
download | vim-git-5b8cfedfbd19a71a30c73cf44b0aec3da7fc1a24.tar.gz |
patch 8.1.1612: cannot show an existing buffer in a popup windowv8.1.1612
Problem: Cannot show an existing buffer in a popup window.
Solution: Support buffer number argument in popup_create().
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index d40b06096..b40aae6b2 100644 --- 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); |