mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:9.1.0775: tests: not enough tests for setting options (#30785)
Problem: tests: not enough tests for setting options
Solution: Add more comprehensive tests to test_options (Milly).
closes: vim/vim#15856
484facebe4
Restore behavior of &l:option for unset local boolean options that was
accidentally changed in #26429.
Co-authored-by: Milly <milly.ca@gmail.com>
This commit is contained in:
@@ -1965,14 +1965,12 @@ typval_T optval_as_tv(OptVal value, bool numbool)
|
||||
case kOptValTypeNil:
|
||||
break;
|
||||
case kOptValTypeBoolean:
|
||||
if (value.data.boolean != kNone) {
|
||||
if (numbool) {
|
||||
rettv.v_type = VAR_NUMBER;
|
||||
rettv.vval.v_number = value.data.boolean == kTrue;
|
||||
} else {
|
||||
rettv.v_type = VAR_BOOL;
|
||||
rettv.vval.v_bool = value.data.boolean == kTrue;
|
||||
}
|
||||
if (numbool) {
|
||||
rettv.v_type = VAR_NUMBER;
|
||||
rettv.vval.v_number = value.data.boolean;
|
||||
} else if (value.data.boolean != kNone) {
|
||||
rettv.v_type = VAR_BOOL;
|
||||
rettv.vval.v_bool = value.data.boolean == kTrue;
|
||||
}
|
||||
break; // return v:null for None boolean value.
|
||||
case kOptValTypeNumber:
|
||||
|
Reference in New Issue
Block a user