Use format for {Win,Buf}SetOption hooks description

This commit is contained in:
Maxime Coste 2015-03-31 13:55:40 +01:00
parent 758bfe7284
commit e875828aa9
2 changed files with 3 additions and 3 deletions

View File

@ -514,7 +514,7 @@ void Buffer::set_fs_timestamp(time_t ts)
void Buffer::on_option_changed(const Option& option) void Buffer::on_option_changed(const Option& option)
{ {
run_hook_in_own_context("BufSetOption", run_hook_in_own_context("BufSetOption",
option.name() + "=" + option.get_as_string()); format("{}={}", option.name(), option.get_as_string()));
} }
void Buffer::run_hook_in_own_context(StringView hook_name, StringView param) void Buffer::run_hook_in_own_context(StringView hook_name, StringView param)

View File

@ -285,8 +285,8 @@ ByteCoordAndTarget Window::offset_coord(ByteCoordAndTarget coord, LineCount offs
void Window::on_option_changed(const Option& option) void Window::on_option_changed(const Option& option)
{ {
String desc = option.name() + "=" + option.get_as_string(); run_hook_in_own_context("WinSetOption",
run_hook_in_own_context("WinSetOption", desc); format("{}={}", option.name(), option.get_as_string()));
// an highlighter might depend on the option, so we need to redraw // an highlighter might depend on the option, so we need to redraw
forget_timestamp(); forget_timestamp();