Hide cursor if TermMode::SHOW_CURSOR is not set

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
This commit is contained in:
Mohammad AlSaleh 2024-01-08 20:58:07 +03:00 committed by Jeremy Soller
parent bb95e28899
commit fc6e2de78b

View file

@ -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