From 4371886293b4956530f8bec49b01c0ee02771434 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 22 Sep 2022 21:08:14 +0800 Subject: vim-patch:9.0.0544: minor issues with setting a string option Problem: Minor issues with setting a string option. Solution: Adjust the code, add a test. (closes vim/vim#11192) https://github.com/vim/vim/commit/fcba86c0316dc0d6341078b50e7967206a1627a0 --- src/nvim/testdir/test_options.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 952975df32..ada6d2406b 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -1209,4 +1209,18 @@ func Test_switchbuf_reset() only! endfunc +" :set empty string for global 'keywordprg' falls back to ":help" +func Test_keywordprg_empty() + let k = &keywordprg + set keywordprg=man + call assert_equal('man', &keywordprg) + set keywordprg= + call assert_equal(':help', &keywordprg) + set keywordprg=man + call assert_equal('man', &keywordprg) + call assert_equal("\n keywordprg=:help", execute('set kp= kp?')) + let &keywordprg = k +endfunc + + " vim: shiftwidth=2 sts=2 expandtab -- cgit