From 1972939ebde39a3e90a50b021b2322d028f344de Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 20 Mar 2022 20:37:43 +0100 Subject: refactor: move updating status from the move cursor command --- src/engine/graphics/scene.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/engine/graphics/scene.cpp') diff --git a/src/engine/graphics/scene.cpp b/src/engine/graphics/scene.cpp index 476b966..4e382fe 100644 --- a/src/engine/graphics/scene.cpp +++ b/src/engine/graphics/scene.cpp @@ -52,7 +52,8 @@ void Scene::write_status(const std::string_view &str) noexcept const auto window_size = _window->size(); _cursor_controller->move_to( - Vector2({.x = 2, .y = static_cast(window_size.get_height())})); + Vector2({.x = 2, .y = static_cast(window_size.get_height())}), + true); auto background_color = get_background_esc_seq(STATUSBAR_COLOR); @@ -61,7 +62,7 @@ void Scene::write_status(const std::string_view &str) noexcept fmt::print(fmt::runtime(str.data())); fmt::print(RESET_ALL_MODES, fmt::arg("esc", ESC)); - _cursor_controller->move_to(previous_position); + _cursor_controller->move_to(previous_position, true); } const std::shared_ptr> &Scene::get_matrix() const noexcept -- cgit v1.2.3-18-g5258