summaryrefslogtreecommitdiff
path: root/src/window.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-06-07 13:46:50 +1000
committerMaxime Coste <mawww@kakoune.org>2020-06-09 21:38:47 +1000
commitf75d49e9efbbaafeaedcca0572c24728baf5f12d (patch)
treea098178f0967f1c99b7151792d240ff352ab4d7a /src/window.cc
parent66f15cf4ad8b0127f93503cad41d570a7c9f5d72 (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/window.cc')
-rw-r--r--src/window.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/window.cc b/src/window.cc
index 8acc7a03..ab885ca9 100644
--- a/src/window.cc
+++ b/src/window.cc
@@ -346,8 +346,7 @@ void Window::clear_display_buffer()
void Window::on_option_changed(const Option& option)
{
- run_hook_in_own_context(Hook::WinSetOption, format("{}={}", option.name(),
- option.get_as_string(Quoting::Raw)));
+ run_hook_in_own_context(Hook::WinSetOption, format("{}={}", option.name(), option.get_desc_string()));
// an highlighter might depend on the option, so we need to redraw
force_redraw();
}