diff options
| author | Maxime Coste <mawww@kakoune.org> | 2020-06-07 13:46:50 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2020-06-09 21:38:47 +1000 |
| commit | f75d49e9efbbaafeaedcca0572c24728baf5f12d (patch) | |
| tree | a098178f0967f1c99b7151792d240ff352ab4d7a /src/scope.cc | |
| parent | 66f15cf4ad8b0127f93503cad41d570a7c9f5d72 (diff) | |
Do not include non-primitive option value in *SetOption hook filter
Only include the value for int/str/bool options, for the rest just
write '<option name>=...'.
This should reduce the cost of some patterns such as repeatedly adding
a value inside a list option.
It seems very unlikely that the actual value would be matched by
a hook regex string for non primitive types.
Diffstat (limited to 'src/scope.cc')
| -rw-r--r-- | src/scope.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scope.cc b/src/scope.cc index 79da998c..64bcd445 100644 --- a/src/scope.cc +++ b/src/scope.cc @@ -19,7 +19,7 @@ void GlobalScope::on_option_changed(const Option& option) { Context empty_context{Context::EmptyContextFlag{}}; hooks().run_hook(Hook::GlobalSetOption, - format("{}={}", option.name(), option.get_as_string(Quoting::Raw)), + format("{}={}", option.name(), option.get_desc_string()), empty_context); } |
