diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-03-30 09:26:39 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-03-30 09:26:39 +1100 |
| commit | f6f2dafaf726505095cb27eea58666bda71d4d55 (patch) | |
| tree | 2d8524c1939f2b9e7e90d383f092668b877294fd /src/option_types.hh | |
| parent | 436e803e30f3ab95f395edfcd4b2e537c1edcd0b (diff) | |
Make set -add replace existing value when applied to a map option
Diffstat (limited to 'src/option_types.hh')
| -rw-r--r-- | src/option_types.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/option_types.hh b/src/option_types.hh index aae25dde..0617a183 100644 --- a/src/option_types.hh +++ b/src/option_types.hh @@ -142,7 +142,7 @@ bool option_add(HashMap<Key, Value, domain>& opt, StringView str) HashItem<Key, Value> item; option_from_string(key_value[0], item.key); option_from_string(key_value[1], item.value); - opt.insert(std::move(item)); + opt[std::move(item.key)] = std::move(item.value); changed = true; } return changed; |
