From e875828aa9d21f33fe86ed8cf72933a7773aec1f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 31 Mar 2015 13:55:40 +0100 Subject: [PATCH] Use format for {Win,Buf}SetOption hooks description --- src/buffer.cc | 2 +- src/window.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/buffer.cc b/src/buffer.cc index 93808fd6..c0167193 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -514,7 +514,7 @@ void Buffer::set_fs_timestamp(time_t ts) void Buffer::on_option_changed(const Option& option) { 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) diff --git a/src/window.cc b/src/window.cc index b23fcdd8..1c205d8d 100644 --- a/src/window.cc +++ b/src/window.cc @@ -285,8 +285,8 @@ ByteCoordAndTarget Window::offset_coord(ByteCoordAndTarget coord, LineCount offs void Window::on_option_changed(const Option& option) { - String desc = option.name() + "=" + option.get_as_string(); - run_hook_in_own_context("WinSetOption", desc); + run_hook_in_own_context("WinSetOption", + format("{}={}", option.name(), option.get_as_string())); // an highlighter might depend on the option, so we need to redraw forget_timestamp();