diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-02-13 05:40:13 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-13 05:40:13 +0800 |
| commit | dc415ce2986c2d09ae9c4c4d01c142f5e780cd47 (patch) | |
| tree | 6807f95d9a3a23bcc313290f644a4ac9e18bf31e /src/nvim/testdir | |
| parent | 90a43e846d96255b35338e95b5841f913ce2c657 (diff) | |
| download | rneovim-dc415ce2986c2d09ae9c4c4d01c142f5e780cd47.tar.gz rneovim-dc415ce2986c2d09ae9c4c4d01c142f5e780cd47.tar.bz2 rneovim-dc415ce2986c2d09ae9c4c4d01c142f5e780cd47.zip | |
vim-patch:8.1.2184: option context is not copied when splitting a window
Problem: Option context is not copied when splitting a window. (Daniel
Hahler)
Solution: Copy the option context, so that ":verbose set" works.
(closes vim/vim#5066)
https://github.com/vim/vim/commit/cfb381421f8be7d6cb4e7dac5b827b23467d3e53
vim-patch:8.2.3804: script context not set when copying 'swf' and 'ts'
Problem: Script context not set when copying 'swf' and 'ts'.
Solution: Use COPY_OPT_SCTX with the right argument. (closes vim/vim#9347)
https://github.com/vim/vim/commit/6206877c511c636cbeb2a2b911451af316b62d00
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_options.vim | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 7d1fed3b94..8612b7013b 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -314,21 +314,50 @@ func Test_set_errors() set modifiable& endfunc +func CheckWasSet(name) + let verb_cm = execute('verbose set ' .. a:name .. '?') + call assert_match('Last set from.*test_options.vim', verb_cm) +endfunc +func CheckWasNotSet(name) + let verb_cm = execute('verbose set ' .. a:name .. '?') + call assert_notmatch('Last set from', verb_cm) +endfunc + " Must be executed before other tests that set 'term'. func Test_000_term_option_verbose() if has('nvim') || has('gui_running') return endif - let verb_cm = execute('verbose set t_cm') - call assert_notmatch('Last set from', verb_cm) + + call CheckWasNotSet('t_cm') let term_save = &term set term=ansi - let verb_cm = execute('verbose set t_cm') - call assert_match('Last set from.*test_options.vim', verb_cm) + call CheckWasSet('t_cm') let &term = term_save endfunc +func Test_copy_context() + setlocal list + call CheckWasSet('list') + split + call CheckWasSet('list') + quit + setlocal nolist + + set ai + call CheckWasSet('ai') + set filetype=perl + call CheckWasSet('filetype') + set fo=tcroq + call CheckWasSet('fo') + + split Xsomebuf + call CheckWasSet('ai') + call CheckWasNotSet('filetype') + call CheckWasSet('fo') +endfunc + func Test_set_ttytype() " Nvim does not support 'ttytype'. if !has('nvim') && !has('gui_running') && has('unix') |