comparison src/option.c @ 14087:1d25a3e8e03c v8.1.0061

patch 8.1.0061: window title is wrong after resetting and setting 'title' commit https://github.com/vim/vim/commit/84a9308511871d9ff94c91a1c6badb92300ded98 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 16 22:58:15 2018 +0200 patch 8.1.0061: window title is wrong after resetting and setting 'title' Problem: Window title is wrong after resetting and setting 'title'. Solution: Move resetting the title into maketitle(). (Jason Franklin)
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Jun 2018 23:00:08 +0200
parents be8fb2fd51fc
children db44cd9f8068
comparison
equal deleted inserted replaced
14086:56f44a087b09 14087:1d25a3e8e03c
3254 static void did_set_option(int opt_idx, int opt_flags, int new_value); 3254 static void did_set_option(int opt_idx, int opt_flags, int new_value);
3255 static char_u *illegal_char(char_u *, int); 3255 static char_u *illegal_char(char_u *, int);
3256 #ifdef FEAT_CMDWIN 3256 #ifdef FEAT_CMDWIN
3257 static char_u *check_cedit(void); 3257 static char_u *check_cedit(void);
3258 #endif 3258 #endif
3259 #ifdef FEAT_TITLE
3260 static void did_set_title(int icon);
3261 #endif
3262 static char_u *option_expand(int opt_idx, char_u *val); 3259 static char_u *option_expand(int opt_idx, char_u *val);
3263 static void didset_options(void); 3260 static void didset_options(void);
3264 static void didset_options2(void); 3261 static void didset_options2(void);
3265 static void check_string_option(char_u **pp); 3262 static void check_string_option(char_u **pp);
3266 #if defined(FEAT_EVAL) || defined(PROTO) 3263 #if defined(FEAT_EVAL) || defined(PROTO)
5372 * maketitle() to create and display it. 5369 * maketitle() to create and display it.
5373 * When switching the title or icon off, call mch_restore_title() to get 5370 * When switching the title or icon off, call mch_restore_title() to get
5374 * the old value back. 5371 * the old value back.
5375 */ 5372 */
5376 static void 5373 static void
5377 did_set_title( 5374 did_set_title(void)
5378 int icon) /* Did set icon instead of title */
5379 { 5375 {
5380 if (starting != NO_SCREEN 5376 if (starting != NO_SCREEN
5381 #ifdef FEAT_GUI 5377 #ifdef FEAT_GUI
5382 && !gui.starting 5378 && !gui.starting
5383 #endif 5379 #endif
5384 ) 5380 )
5385 {
5386 maketitle(); 5381 maketitle();
5387 if (icon)
5388 {
5389 if (!p_icon)
5390 mch_restore_title(2);
5391 }
5392 else
5393 {
5394 if (!p_title)
5395 mch_restore_title(1);
5396 }
5397 }
5398 } 5382 }
5399 #endif 5383 #endif
5400 5384
5401 /* 5385 /*
5402 * set_options_bin - called when 'bin' changes value. 5386 * set_options_bin - called when 'bin' changes value.
6947 if (vim_strchr(*varp, '%') && check_stl_option(*varp) == NULL) 6931 if (vim_strchr(*varp, '%') && check_stl_option(*varp) == NULL)
6948 stl_syntax |= flagval; 6932 stl_syntax |= flagval;
6949 else 6933 else
6950 stl_syntax &= ~flagval; 6934 stl_syntax &= ~flagval;
6951 # endif 6935 # endif
6952 did_set_title(varp == &p_iconstring); 6936 did_set_title();
6953
6954 } 6937 }
6955 #endif 6938 #endif
6956 6939
6957 #ifdef FEAT_GUI 6940 #ifdef FEAT_GUI
6958 /* 'guioptions' */ 6941 /* 'guioptions' */
8399 } 8382 }
8400 #endif 8383 #endif
8401 8384
8402 #ifdef FEAT_TITLE 8385 #ifdef FEAT_TITLE
8403 /* when 'title' changed, may need to change the title; same for 'icon' */ 8386 /* when 'title' changed, may need to change the title; same for 'icon' */
8404 else if ((int *)varp == &p_title) 8387 else if ((int *)varp == &p_title || (int *)varp == &p_icon)
8405 { 8388 {
8406 did_set_title(FALSE); 8389 did_set_title();
8407 }
8408
8409 else if ((int *)varp == &p_icon)
8410 {
8411 did_set_title(TRUE);
8412 } 8390 }
8413 #endif 8391 #endif
8414 8392
8415 else if ((int *)varp == &curbuf->b_changed) 8393 else if ((int *)varp == &curbuf->b_changed)
8416 { 8394 {