aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-20 20:37:43 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:57 +0200
commit1972939ebde39a3e90a50b021b2322d028f344de (patch)
tree9ee0a7c78f082bec084189906f28dc679a20d339 /src/engine/graphics
parente6644d6b235005de9ba1b9884472fa5f5d8d6074 (diff)
refactor: move updating status from the move cursor command
Diffstat (limited to 'src/engine/graphics')
-rw-r--r--src/engine/graphics/scene.cpp5
1 files changed, 3 insertions, 2 deletions
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<Vector2::Value>(window_size.get_height())}));
+ Vector2({.x = 2, .y = static_cast<Vector2::Value>(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<IMatrix<std::string_view>> &Scene::get_matrix() const noexcept