0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.1405: "highlight" option of popup windows not supported

Problem:    "highlight" option of popup windows not supported.
Solution:   Implement the "highlight" option.
This commit is contained in:
Bram Moolenaar
2019-05-26 21:03:24 +02:00
parent 9d591525a5
commit 20c023aee0
9 changed files with 71 additions and 20 deletions

View File

@@ -5953,6 +5953,54 @@ set_string_option_direct(
}
}
/*
* Like set_string_option_direct(), but for a window-local option in "wp".
* Blocks autocommands to avoid the old curwin becoming invalid.
*/
void
set_string_option_direct_in_win(
win_T *wp,
char_u *name,
int opt_idx,
char_u *val,
int opt_flags,
int set_sid)
{
win_T *save_curwin = curwin;
block_autocmds();
curwin = wp;
curbuf = curwin->w_buffer;
set_string_option_direct(name, opt_idx, val, opt_flags, set_sid);
curwin = save_curwin;
curbuf = curwin->w_buffer;
unblock_autocmds();
}
/*
* Like set_string_option_direct(), but for a buffer-local option in "buf".
* Blocks autocommands to avoid the old curbuf becoming invalid.
*/
void
set_string_option_direct_in_buf(
buf_T *buf,
char_u *name,
int opt_idx,
char_u *val,
int opt_flags,
int set_sid)
{
buf_T *save_curbuf = curbuf;
block_autocmds();
curbuf = buf;
curwin->w_buffer = curbuf;
set_string_option_direct(name, opt_idx, val, opt_flags, set_sid);
curbuf = save_curbuf;
curwin->w_buffer = curbuf;
unblock_autocmds();
}
/*
* Set global value for string option when it's a local option.
*/