Skip to content
Myr

chore(deps): bump ansi from 0.3.2 to 0.4.0

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ayman Bagabas · committed by Ayman Bagabas · parent 1c01f2b · Browse files · 3 files+13 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+13 added−11 removed

  • other:+13 added−11 removed

3 files+13 added−11 removed

modified:go.mod+1 added-1 removed
2 unmodified lines
3go 1.1845require (6 github.com/charmbracelet/lipgloss v0.13.07 github.com/charmbracelet/x/ansi v0.3.27 github.com/charmbracelet/x/ansi v0.4.08 github.com/charmbracelet/x/term v0.2.09 github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f10 github.com/mattn/go-localereader v0.0.111 github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6
14 unmodified lines
modified:go.sum+2 added
2 unmodified lines
3github.com/charmbracelet/lipgloss v0.13.0 h1:4X3PPeoWEDCMvzDvGmTajSyYPcZM4+y8sCA/SsA3cjw=4github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDUxr8Lw7dvFrAIbbY=5github.com/charmbracelet/x/ansi v0.3.2 h1:wsEwgAN+C9U06l9dCVMX0/L3x7ptvY1qmjMwyfE6USY=6github.com/charmbracelet/x/ansi v0.3.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=7github.com/charmbracelet/x/ansi v0.4.0 h1:NqwHA4B23VwsDn4H3VcNX1W1tOmgnvY1NDx5tOXdnOU=8github.com/charmbracelet/x/ansi v0.4.0/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=9github.com/charmbracelet/x/term v0.2.0 h1:cNB9Ot9q8I711MyZ7myUR5HFWL/lc3OpU8jZ4hwm0x0=10github.com/charmbracelet/x/term v0.2.0/go.mod h1:GVxgxAbjUrmpvIINHIQnJJKpMlHiZ4cktEQCN6GWyF0=11github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=12github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
25 unmodified lines
modified:standard_renderer.go+10 added-10 removed
274 unmodified lines
275 if r.altScreenActive {276 // This case fixes a bug in macOS terminal. In other terminals the277 // other case seems to do the job regardless of whether or not we're278 // using the full terminal window.279 buf.WriteString(ansi.MoveCursor(r.linesRendered, 0))279 buf.WriteString(ansi.SetCursorPosition(0, r.linesRendered))280 } else {281 buf.WriteString(ansi.CursorLeft(r.width))282 }283
27 unmodified lines
311func (r *standardRenderer) clearScreen() {312 r.mtx.Lock()313 defer r.mtx.Unlock()314315 r.execute(ansi.EraseEntireDisplay)316 r.execute(ansi.MoveCursorOrigin)315 r.execute(ansi.EraseEntireScreen)316 r.execute(ansi.CursorOrigin)317318 r.repaint()319}320
20 unmodified lines
341 // default).342 //343 // Note: we can't use r.clearScreen() here because the mutex is already344 // locked.345 r.execute(ansi.EraseEntireDisplay)346 r.execute(ansi.MoveCursorOrigin)345 r.execute(ansi.EraseEntireScreen)346 r.execute(ansi.CursorOrigin)347348 // cmd.exe and other terminals keep separate cursor states for the AltScreen349 // and the main buffer. We have to explicitly reset the cursor visibility350 // whenever we enter AltScreen.
164 unmodified lines
515 buf.WriteString(ansi.EraseEntireLine)516 }517 buf.WriteString(ansi.CursorUp1)518 }519 buf.WriteString(ansi.MoveCursor(r.linesRendered, 0)) // put cursor back519 buf.WriteString(ansi.SetCursorPosition(0, r.linesRendered)) // put cursor back520 _, _ = r.out.Write(buf.Bytes())521 }522}523
31 unmodified lines
555556 buf := &bytes.Buffer{}557558 buf.WriteString(ansi.SetScrollingRegion(topBoundary, bottomBoundary))559 buf.WriteString(ansi.MoveCursor(topBoundary, 0))559 buf.WriteString(ansi.SetCursorPosition(0, topBoundary))560 buf.WriteString(ansi.InsertLine(len(lines)))561 _, _ = buf.WriteString(strings.Join(lines, "\r\n"))562 buf.WriteString(ansi.SetScrollingRegion(0, r.height))563564 // Move cursor back to where the main rendering routine expects it to be565 buf.WriteString(ansi.MoveCursor(r.linesRendered, 0))565 buf.WriteString(ansi.SetCursorPosition(0, r.linesRendered))566567 _, _ = r.out.Write(buf.Bytes())568}569
15 unmodified lines
585586 buf := &bytes.Buffer{}587588 buf.WriteString(ansi.SetScrollingRegion(topBoundary, bottomBoundary))589 buf.WriteString(ansi.MoveCursor(bottomBoundary, 0))589 buf.WriteString(ansi.SetCursorPosition(0, bottomBoundary))590 _, _ = buf.WriteString("\r\n" + strings.Join(lines, "\r\n"))591 buf.WriteString(ansi.SetScrollingRegion(0, r.height))592593 // Move cursor back to where the main rendering routine expects it to be594 buf.WriteString(ansi.MoveCursor(r.linesRendered, 0))594 buf.WriteString(ansi.SetCursorPosition(0, r.linesRendered))595596 _, _ = r.out.Write(buf.Bytes())597}598
171 unmodified lines