aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-05-13 00:41:20 +0100
committerGitHub <noreply@github.com>2022-05-13 00:41:20 +0100
commitaaeffba6846bf1e6065be3079e6e9d4310298227 (patch)
tree8dfa9f6efb4c8b5102bf9cba6c600e75c9cdb6b3 /src/nvim/testdir
parentaf9c1e572dc1015b7b8f2a8a09d527f54ca080d3 (diff)
downloadrneovim-aaeffba6846bf1e6065be3079e6e9d4310298227.tar.gz
rneovim-aaeffba6846bf1e6065be3079e6e9d4310298227.tar.bz2
rneovim-aaeffba6846bf1e6065be3079e6e9d4310298227.zip
vim-patch:8.2.4943: changing 'switchbuf' may have no effect (#18545)
Problem: Changing 'switchbuf' may have no effect. Solution: Handle 'switchbuf' in didset_string_options(). (Sean Dewar, closes vim/vim#10406) https://github.com/vim/vim/commit/39c46b43780ad00ea27a93d92aadd44753d4c3ea Guess it doesn't hurt to cherry-pick didset_string_options from v8.1.2045 (but in option.c, for now).
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_options.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 8f67b1732e..9e16625cc2 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -832,4 +832,17 @@ func Test_opt_cdhome()
set cdhome&
endfunc
+func Test_switchbuf_reset()
+ set switchbuf=useopen
+ sblast
+ call assert_equal(1, winnr('$'))
+ set all&
+ " Nvim has a different default for 'switchbuf'
+ " call assert_equal('', &switchbuf)
+ call assert_equal('uselast', &switchbuf)
+ sblast
+ call assert_equal(2, winnr('$'))
+ only!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab