0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.4943: changing 'switchbuf' may have no effect

Problem:    Changing 'switchbuf' may have no effect.
Solution:   Handle 'switchbuf' in didset_string_options(). (Sean Dewar,
            closes #10406)
This commit is contained in:
Sean Dewar 2022-05-12 17:44:29 +01:00 committed by Bram Moolenaar
parent de216732d4
commit 39c46b4378
3 changed files with 14 additions and 0 deletions

View File

@ -125,6 +125,7 @@ didset_string_options(void)
#if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
(void)opt_strings_flags(p_tbis, p_tbis_values, &tbis_flags, FALSE); (void)opt_strings_flags(p_tbis, p_tbis_values, &tbis_flags, FALSE);
#endif #endif
(void)opt_strings_flags(p_swb, p_swb_values, &swb_flags, TRUE);
} }
#if defined(FEAT_EVAL) #if defined(FEAT_EVAL)

View File

@ -1299,4 +1299,15 @@ func Test_set_completion_2()
set wildoptions= set wildoptions=
endfunc endfunc
func Test_switchbuf_reset()
set switchbuf=useopen
sblast
call assert_equal(1, winnr('$'))
set all&
call assert_equal('', &switchbuf)
sblast
call assert_equal(2, winnr('$'))
only!
endfunc
" vim: shiftwidth=2 sts=2 expandtab " vim: shiftwidth=2 sts=2 expandtab

View File

@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4943,
/**/ /**/
4942, 4942,
/**/ /**/