diff options
| author | Billy SU <g4691821@gmail.com> | 2020-01-22 15:47:32 +0800 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2020-01-21 23:47:32 -0800 |
| commit | e53e860759e8b74a98072bc333a49b48649ad6f9 (patch) | |
| tree | 44a596cab93093b468145af27a4e3f9ff11c7273 /src/nvim/option.c | |
| parent | 97dcc48c998ccecaa37a3cbea568d85c2f1407f9 (diff) | |
| download | rneovim-e53e860759e8b74a98072bc333a49b48649ad6f9.tar.gz rneovim-e53e860759e8b74a98072bc333a49b48649ad6f9.tar.bz2 rneovim-e53e860759e8b74a98072bc333a49b48649ad6f9.zip | |
vim-patch:8.1.0061: fix resetting, setting 'title' #11733
Problem: Window title is wrong after resetting and setting 'title'.
Solution: Move resetting the title into maketitle(). (Jason Franklin)
https://github.com/vim/vim/commit/84a9308511871d9ff94c91a1c6badb92300ded98
Diffstat (limited to 'src/nvim/option.c')
| -rw-r--r-- | src/nvim/option.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 2871a4b7de..f03dcc2bf2 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2021,13 +2021,10 @@ static char_u *check_cedit(void) // maketitle() to create and display it. // When switching the title or icon off, call ui_set_{icon,title}(NULL) to get // the old value back. -static void did_set_title( - int icon // Did set icon instead of title -) +static void did_set_title(void) { if (starting != NO_SCREEN) { maketitle(); - resettitle(); } } @@ -2986,7 +2983,7 @@ ambw_end: } else { stl_syntax &= ~flagval; } - did_set_title(varp == &p_iconstring); + did_set_title(); } else if (varp == &p_sel) { // 'selection' if (*p_sel == NUL @@ -4025,9 +4022,9 @@ static char *set_bool_option(const int opt_idx, char_u *const varp, (void)buf_init_chartab(curbuf, false); // ignore errors } else if ((int *)varp == &p_title) { // when 'title' changed, may need to change the title; same for 'icon' - did_set_title(false); + did_set_title(); } else if ((int *)varp == &p_icon) { - did_set_title(true); + did_set_title(); } else if ((int *)varp == &curbuf->b_changed) { if (!value) { save_file_ff(curbuf); // Buffer is unchanged |