mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 18:11:47 +00:00
fix(options): crash when setting option to empty dict #40492
This commit is contained in:
@@ -3650,7 +3650,7 @@ OptVal object_as_optval_for(OptIndex opt_idx, Object o, set_op_T op, bool *error
|
||||
}
|
||||
// Sort maps and comma-flag lists for a deterministic result (Dict order is unstable); a bare
|
||||
// flag list is concatenated in-order with no separator.
|
||||
if (is_map || is_comma) {
|
||||
if (ga.ga_len > 0 && (is_map || is_comma)) {
|
||||
sort_strings(ga.ga_data, ga.ga_len);
|
||||
}
|
||||
str = ga_concat_strings(&ga, (is_flaglist && !is_comma) ? "" : ",");
|
||||
|
||||
Reference in New Issue
Block a user