Skip to content

Commit

Permalink
Use automargin disable
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Mar 2, 2024
1 parent f6c43a3 commit 5a591d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions console_win.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 5a591d4

Please sign in to comment.