Commit df74dca0

df74dca0d99dMergedon zach-1de969

zach · 1 month ago · 1 file · ~1 modified

Details

Commit
df74dca0d99d
Parent
147fcf20ec30

src/term.rsmodifiedView file

@@ -820,7 +820,9 @@
820820 self.goto(0, 0);
821821 }
822822 7 => self.modes.autowrap = on,
823- 12 => self.cursor_blink = on,
823+ // Mode 12 (start/stop blinking) is ignored: curses programs send "\e[?12l" as part of
824+ // xterm's cnorm on every exit, which would leave the cursor steady for good after the
825+ // first vim or less. Programs change blinking with DECSCUSR instead.
824826 25 => self.modes.show_cursor = on,
825827 47 | 1047 => {
826828 if on {
@@ -1616,9 +1618,10 @@
16161618 assert!(t.cursor_blink);
16171619 p.advance(&mut t, b"\x1b[6 q");
16181620 assert_eq!((t.cursor_shape, t.cursor_blink), (CursorShape::Beam, false));
1619- p.advance(&mut t, b"\x1b[?12h");
1620- assert!(t.cursor_blink);
16211621 p.advance(&mut t, b"\x1b[0 q");
16221622 assert_eq!((t.cursor_shape, t.cursor_blink), (CursorShape::Block, true));
1623+ // What vim and less send on exit must not stop the blinking.
1624+ p.advance(&mut t, b"\x1b[?12l\x1b[?25h");
1625+ assert_eq!((t.cursor_shape, t.cursor_blink), (CursorShape::Block, true));
16231626 }
16241627 }