@@ -55,13 +55,26 @@ impl EditorView {
5555 is_focused: bool,
5656 ) {
5757 let area = Rect::new(
58− viewport.x + OFFSET,
59− viewport.y,
60− viewport.width - OFFSET,
61− viewport.height.saturating_sub(1),
58+ view.area.x + OFFSET,
59+ view.area.y,
60+ view.area.width - OFFSET,
61+ view.area.height.saturating_sub(1),
6262 ); // - 1 for statusline
6363 self.render_buffer(doc, view, area, surface, theme, is_focused);
6464
65+ // if we're not at the edge of the screen, draw a right border
66+ if viewport.right() != view.area.right() {
67+ let x = area.right();
68+ let border_style = theme.get("ui.window");
69+ for y in area.top()..area.bottom() {
70+ surface
71+ .get_mut(x, y)
72+ // .set_symbol(tui::symbols::line::VERTICAL)
73+ .set_symbol(" ")
74+ .set_style(border_style);
75+ }
76+ }
77+
6578 // clear with background color
6679 // TODO: this seems to prevent setting style later
6780 // surface.set_style(viewport, theme.get("ui.background"));
@@ -69,9 +82,9 @@ impl EditorView {
6982 self.render_diagnostics(doc, view, area, surface, theme, is_focused);
7083
7184 let area = Rect::new(
72− viewport.x,
73− viewport.y + viewport.height.saturating_sub(1),
74− viewport.width,
85+ view.area.x,
86+ view.area.y + view.area.height.saturating_sub(1),
87+ view.area.width,
7588 1,
7689 );
7790 self.render_statusline(doc, area, surface, theme, is_focused);
@@ -79,7 +92,12 @@ impl EditorView {
7992 // render status
8093 if let Some(status_msg) = &self.status_msg {
8194 let style = Style::default().fg(Color::Rgb(164, 160, 232)); // lavender
82− surface.set_string(viewport.x, viewport.y + viewport.height, status_msg, style);
95+ surface.set_string(
96+ view.area.x,
97+ view.area.y + view.area.height,
98+ status_msg,
99+ style,
100+ );
83101 }
84102 }
85103
@@ -595,7 +613,7 @@ impl Component for EditorView {
595613 fn render(&self, mut area: Rect, surface: &mut Surface, cx: &mut Context) {
596614 for (view, is_focused) in cx.editor.tree.views() {
597615 let doc = cx.editor.document(view.doc).unwrap();
598− self.render_view(doc, view, view.area, surface, &cx.editor.theme, is_focused);
616+ self.render_view(doc, view, area, surface, &cx.editor.theme, is_focused);
599617 }
600618
601619 if let Some(completion) = &self.completion {