aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-term/src/ui/editor.rs1
-rw-r--r--helix-view/src/tree.rs1
2 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index b071292c..32697a03 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -350,7 +350,6 @@ impl Component for EditorView {
Event::Resize(width, height) => {
// HAXX: offset the render area height by 1 to account for prompt/commandline
cx.editor.tree.resize(Rect::new(0, 0, width, height - 1));
- // TODO: restore view.ensure_cursor_in_view();
EventResult::Consumed(None)
}
Event::Key(event) => {
diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs
index 382ef09e..0a487b6f 100644
--- a/helix-view/src/tree.rs
+++ b/helix-view/src/tree.rs
@@ -231,6 +231,7 @@ impl Tree {
Content::View(view) => {
// debug!!("setting view area {:?}", area);
view.area = area;
+ view.ensure_cursor_in_view();
} // TODO: call f()
Content::Container(container) => {
// debug!!("setting container area {:?}", area);