mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 02:21:51 +00:00
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)
cfb381421f
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)
6206877c51
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user