Skip to content

Commit

Permalink
Hide Vim mode label in editor if no tabs open (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
panarch authored Jan 24, 2025
1 parent c813f26 commit a534303
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tui/src/views/body/notebook/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ pub fn draw(frame: &mut Frame, area: Rect, context: &mut Context) {
_ => (Span::raw(" ").bg(GRAY_DARK), GRAY_DARK),
};

bottom_left.insert(0, mode);
bottom_left.insert(1, Span::raw("").fg(bg).bg(GRAY_A));
if context.notebook.tab_index.is_some() {
bottom_left.insert(0, mode);
bottom_left.insert(1, Span::raw("").fg(bg).bg(GRAY_A));
}

let bottom_left = Line::from(bottom_left);
let block = Block::new().title(title).title_bottom(bottom_left);
Expand Down

0 comments on commit a534303

Please sign in to comment.