0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.1.1423: popup windows use options from current window and buffer

Problem:    Popup windows use options from current window and buffer.
Solution:   Clear all local options when creating a popup window.
This commit is contained in:
Bram Moolenaar
2019-05-30 15:22:43 +02:00
parent 8c2a600f72
commit cacc6a5c98
5 changed files with 66 additions and 8 deletions

View File

@@ -253,6 +253,10 @@ f_popup_create(typval_T *argvars, typval_T *rettv)
if (buf == NULL)
return;
ml_open(buf);
win_init_popup_win(wp, buf);
set_local_options_default(wp);
set_string_option_direct_in_buf(buf, (char_u *)"buftype", -1,
(char_u *)"popup", OPT_FREE|OPT_LOCAL, 0);
set_string_option_direct_in_buf(buf, (char_u *)"bufhidden", -1,
@@ -262,8 +266,6 @@ f_popup_create(typval_T *argvars, typval_T *rettv)
buf->b_p_bl = FALSE; // unlisted buffer
buf->b_locked = TRUE;
win_init_popup_win(wp, buf);
nr = (int)dict_get_number(d, (char_u *)"tab");
if (nr == 0)
{