diff --git a/src/keys.cc b/src/keys.cc index 24dfe0dd..db87e48f 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -162,7 +162,7 @@ KeyList parse_keys(StringView str) return result; } -StringView button_to_str(Key::MouseButton button) +StringView to_string(Key::MouseButton button) { switch (button) { @@ -189,9 +189,9 @@ String to_string(Key key) case Key::Modifiers::MousePos: return format("", coord.line, coord.column); case Key::Modifiers::MousePress: - return format("", button_to_str(key.mouse_button()), coord.line, coord.column); + return format("", key.mouse_button(), coord.line, coord.column); case Key::Modifiers::MouseRelease: - return format("", button_to_str(key.mouse_button()), coord.line, coord.column); + return format("", key.mouse_button(), coord.line, coord.column); case Key::Modifiers::Scroll: return format("", static_cast(key.key)); case Key::Modifiers::Resize: diff --git a/src/keys.hh b/src/keys.hh index 78c24b59..2914de41 100644 --- a/src/keys.hh +++ b/src/keys.hh @@ -103,7 +103,7 @@ class StringView; KeyList parse_keys(StringView str); String to_string(Key key); -StringView button_to_str(Key::MouseButton button); +StringView to_string(Key::MouseButton button); Key::MouseButton str_to_button(StringView str); constexpr Key shift(Key key)