Use format for {Win,Buf}SetOption hooks description
This commit is contained in:
parent
758bfe7284
commit
e875828aa9
|
@ -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)
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user