File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ set cpo&vim
3
3
4
4
let s: on_windows = has (' win32' ) || has (' win64' )
5
5
let s: dict_t = type ({})
6
+ let s: list_t = type ([])
6
7
if exists (' v:true' )
7
8
let s: bool_t = type (v: true )
8
9
else
@@ -44,12 +45,12 @@ endfunction
44
45
function ! s: create_keyvals (key , val) abort
45
46
if type (a: val ) == s: dict_t
46
47
return a: key . ' : {' . s: stringize_options (a: val ) . ' }'
48
+ elseif type (a: val ) == s: bool_t
49
+ return a: key . (a: val == v: true ? ' : true' : ' : false' )
50
+ elseif type (a: val ) == s: list_t
51
+ return a: key . ' : [' . join (a: val ,' ,' ) . ' ]'
47
52
else
48
- if type (a: val ) == s: bool_t
49
- return a: key . (a: val == v: true ? ' : true' : ' : false' )
50
- else
51
- return a: key . ' : ' . a: val
52
- endif
53
+ return a: key . ' : '' ' . a: val . ' ' ' '
53
54
endif
54
55
endfunction
55
56
You can’t perform that action at this time.
0 commit comments