Mercurial > vim
diff src/popupwin.c @ 17845:b6acc24df7de v8.1.1919
patch 8.1.1919: using window options when passing a buffer to popup_create()
Commit: https://github.com/vim/vim/commit/4645104be4c521dfdd43621c19e96bda3cac7be2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 24 15:50:46 2019 +0200
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Aug 2019 16:00:04 +0200 |
parents | 9696c76f2213 |
children | bdddd215bf09 |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -1543,6 +1543,7 @@ popup_create(typval_T *argvars, typval_T // 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 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,