Skip to content

Commit

Permalink
Hide cursor if TermMode::SHOW_CURSOR is not set
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammad AlSaleh <[email protected]>
  • Loading branch information
MoSal authored and jackpot51 committed Jan 11, 2024
1 parent bb95e28 commit fc6e2de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,11 @@ impl Terminal {
// Change color if cursor
if indexed.point == grid.cursor.point {
//TODO: better handling of cursor
mem::swap(&mut fg, &mut bg);
if term.mode().contains(TermMode::SHOW_CURSOR) {
mem::swap(&mut fg, &mut bg);
} else {
fg = bg;
}
}

// Change color if selected
Expand Down

0 comments on commit fc6e2de

Please sign in to comment.