@@ -42,8 +42,8 @@ impl EditorView {
4242 viewport.x + OFFSET,
4343 viewport.y,
4444 viewport.width - OFFSET,
45− viewport.height - 2,
46− ); // - 2 for statusline and prompt
45+ viewport.height - 1,
46+ ); // - 1 for statusline
4747 self.render_buffer(view, area, surface, theme, is_focused);
4848
4949 // clear with background color
@@ -52,7 +52,7 @@ impl EditorView {
5252
5353 let area = Rect::new(
5454 viewport.x,
55− viewport.y + viewport.height - 2,
55+ viewport.y + viewport.height - 1,
5656 viewport.width,
5757 1,
5858 );
@@ -301,9 +301,8 @@ impl Component for EditorView {
301301 fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult {
302302 match event {
303303 Event::Resize(width, height) => {
304− // TODO: simplistic ensure cursor in view for now
305− // TODO: loop over views
306− cx.editor.tree.resize(Rect::new(0, 0, width, height));
304+ // HAXX: offset the render area height by 1 to account for prompt/commandline
305+ cx.editor.tree.resize(Rect::new(0, 0, width, height - 1));
307306 // TODO: restore view.ensure_cursor_in_view();
308307 EventResult::Consumed(None)
309308 }
@@ -353,10 +352,11 @@ impl Component for EditorView {
353352 }
354353 }
355354
356− fn render(&self, area: Rect, surface: &mut Surface, cx: &mut Context) {
355+ fn render(&self, mut area: Rect, surface: &mut Surface, cx: &mut Context) {
357356 // SAFETY: we cheat around the view_mut() borrow because it doesn't allow us to also borrow
358357 // theme. Theme is immutable mutating view won't disrupt theme_ref.
359358 let theme_ref = unsafe { &*(&cx.editor.theme as *const Theme) };
359+
360360 for (view, is_focused) in cx.editor.tree.views() {
361361 // TODO: use parent area
362362 self.render_view(view, view.area, surface, theme_ref, is_focused);