aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-02 02:38:10 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-02-11 15:27:57 +0100
commite578d586f28160d684087bae99482ab3912d3770 (patch)
treef4e2319c9934728a45b2870feb7148e61f766ec2 /src/nvim/testdir
parentfd58863eb62edddf688a71d73448934efa188241 (diff)
downloadrneovim-e578d586f28160d684087bae99482ab3912d3770.tar.gz
rneovim-e578d586f28160d684087bae99482ab3912d3770.tar.bz2
rneovim-e578d586f28160d684087bae99482ab3912d3770.zip
vim-patch:8.0.0974: resetting a string option does not trigger OptionSet
Problem: Resetting a string option does not trigger OptionSet. (Rick Howe) Solution: Set the origval. https://github.com/vim/vim/commit/8efa026a25b95de5598535ef62505282a8584a4b
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_autocmd.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 31ec6a9a33..f41c1983a9 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -550,6 +550,19 @@ func Test_OptionSet()
call assert_equal([['key', 'invalid', 'invalid1', 'invalid']], g:options)
call assert_equal(g:opt[0], g:opt[1])
+ " 18: Setting string option"
+ let oldval = &tags
+ let g:options=[['tags', oldval, 'tagpath', 'global']]
+ set tags=tagpath
+ call assert_equal([], g:options)
+ call assert_equal(g:opt[0], g:opt[1])
+
+ " 1l: Resetting string option"
+ let g:options=[['tags', 'tagpath', oldval, 'global']]
+ set tags&
+ call assert_equal([], g:options)
+ call assert_equal(g:opt[0], g:opt[1])
+
" Cleanup
au! OptionSet
for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp']