From 5a591d427559cbb726a23d5883ac3c52d9d41afa Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 2 Mar 2024 12:02:40 -0800 Subject: [PATCH] Use automargin disable --- console_win.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/console_win.go b/console_win.go index 0a8df712..08c08f84 100644 --- a/console_win.go +++ b/console_win.go @@ -159,6 +159,8 @@ const ( vtCursorSteadyUnderline = "\x1b[4 q" vtCursorBlinkingBar = "\x1b[5 q" vtCursorSteadyBar = "\x1b[6 q" + vtDisableAm = "\x1b[?7l" + vtEnableAm = "\x1b[?7h" ) var vtCursorStyles = map[CursorStyle]string{ @@ -324,6 +326,7 @@ func (s *cScreen) disengage() { if s.vten { s.emitVtString(vtCursorStyles[CursorStyleDefault]) + s.emitVtString(vtEnableAm) } s.setInMode(s.oimode) s.setOutMode(s.oomode) @@ -357,6 +360,7 @@ func (s *cScreen) engage() error { if s.vten { s.setOutMode(modeVtOutput | modeNoAutoNL | modeCookedOut | modeUnderline) + s.emitVtString(vtDisableAm) } else { s.setOutMode(0) }