]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4943: changing 'switchbuf' may have no effect v8.2.4943
authorSean Dewar <seandewar@users.noreply.github.com>
Thu, 12 May 2022 16:44:29 +0000 (17:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 12 May 2022 16:44:29 +0000 (17:44 +0100)
Problem:    Changing 'switchbuf' may have no effect.
Solution:   Handle 'switchbuf' in didset_string_options(). (Sean Dewar,
            closes #10406)

src/optionstr.c
src/testdir/test_options.vim
src/version.c

index 26dd55120b45e25b2a0b718b9287b8c66150609e..73a57703b82e4cf96ab9a156bddf4a172fff87af 100644 (file)
@@ -125,6 +125,7 @@ didset_string_options(void)
 #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
     (void)opt_strings_flags(p_tbis, p_tbis_values, &tbis_flags, FALSE);
 #endif
+    (void)opt_strings_flags(p_swb, p_swb_values, &swb_flags, TRUE);
 }
 
 #if defined(FEAT_EVAL)
index 8854ffd24000df1681668272da76ad4518e9196d..0a533152b9cde36e672f53e8a67fa25f3f10da31 100644 (file)
@@ -1299,4 +1299,15 @@ func Test_set_completion_2()
   set wildoptions=
 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
index 480acfda11c7d0cfff37b634036f3029a2bdf254..0ebc9cbe92c8cb468f15b3ebf32b36a2def34c33 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4943,
 /**/
     4942,
 /**/