1
0
forked from aniani/vim

patch 8.1.1919: using window options when passing a buffer to popup_create()

Problem:    Using current window option values when passing a buffer to
            popup_create().
Solution:   Clear the window-local options. (closes #4857)
This commit is contained in:
Bram Moolenaar
2019-08-24 15:50:46 +02:00
parent e9a891f255
commit 4645104be4
5 changed files with 18 additions and 3 deletions

View File

@@ -1543,6 +1543,7 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
// use existing buffer
new_buffer = FALSE;
win_init_popup_win(wp, buf);
set_local_options_default(wp, FALSE);
buffer_ensure_loaded(buf);
}
else
@@ -1556,7 +1557,7 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
win_init_popup_win(wp, buf);
set_local_options_default(wp);
set_local_options_default(wp, TRUE);
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,