From fc78f868e8209e0808e091ab964d4d7d15ba609b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:13:13 +0000 Subject: [PATCH] Bump github.com/charmbracelet/bubbletea from 0.26.3 to 0.26.4 Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.26.3 to 0.26.4. - [Release notes](https://github.com/charmbracelet/bubbletea/releases) - [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.26.3...v0.26.4) --- updated-dependencies: - dependency-name: github.com/charmbracelet/bubbletea dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 +-- go.sum | 8 ++--- .../charmbracelet/bubbletea/screen.go | 36 ++++++++++++++++--- .../github.com/charmbracelet/bubbletea/tea.go | 7 ++++ .../github.com/charmbracelet/x/ansi/style.go | 6 ++++ vendor/modules.txt | 4 +-- 6 files changed, 52 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 5e6e143..fabd742 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.22.0 require ( github.com/atotto/clipboard v0.1.4 - github.com/charmbracelet/bubbletea v0.26.3 + github.com/charmbracelet/bubbletea v0.26.4 github.com/spf13/cobra v1.8.0 github.com/tobischo/gokeepasslib/v3 v3.6.0 golang.org/x/term v0.20.0 ) require ( - github.com/charmbracelet/x/ansi v0.1.1 // indirect + github.com/charmbracelet/x/ansi v0.1.2 // indirect github.com/charmbracelet/x/input v0.1.0 // indirect github.com/charmbracelet/x/term v0.1.1 // indirect github.com/charmbracelet/x/windows v0.1.0 // indirect diff --git a/go.sum b/go.sum index ae8b55b..2fb2f43 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/charmbracelet/bubbletea v0.26.3 h1:iXyGvI+FfOWqkB2V07m1DF3xxQijxjY2j8PqiXYqasg= -github.com/charmbracelet/bubbletea v0.26.3/go.mod h1:bpZHfDHTYJC5g+FBK+ptJRCQotRC+Dhh3AoMxa/2+3Q= -github.com/charmbracelet/x/ansi v0.1.1 h1:CGAduulr6egay/YVbGc8Hsu8deMg1xZ/bkaXTPi1JDk= -github.com/charmbracelet/x/ansi v0.1.1/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/bubbletea v0.26.4 h1:2gDkkzLZaTjMl/dQBpNVtnvcCxsh/FCkimep7FC9c40= +github.com/charmbracelet/bubbletea v0.26.4/go.mod h1:P+r+RRA5qtI1DOHNFn0otoNwB4rn+zNAzSj/EXz6xU0= +github.com/charmbracelet/x/ansi v0.1.2 h1:6+LR39uG8DE6zAmbu023YlqjJHkYXDF1z36ZwzO4xZY= +github.com/charmbracelet/x/ansi v0.1.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/charmbracelet/x/input v0.1.0 h1:TEsGSfZYQyOtp+STIjyBq6tpRaorH0qpwZUj8DavAhQ= github.com/charmbracelet/x/input v0.1.0/go.mod h1:ZZwaBxPF7IG8gWWzPUVqHEtWhc1+HXJPNuerJGRGZ28= github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI= diff --git a/vendor/github.com/charmbracelet/bubbletea/screen.go b/vendor/github.com/charmbracelet/bubbletea/screen.go index c17e5b6..6256c15 100644 --- a/vendor/github.com/charmbracelet/bubbletea/screen.go +++ b/vendor/github.com/charmbracelet/bubbletea/screen.go @@ -151,6 +151,8 @@ type disableBracketedPasteMsg struct{} func (p *Program) EnterAltScreen() { if p.renderer != nil { p.renderer.enterAltScreen() + } else { + p.startupOptions |= withAltScreen } } @@ -160,6 +162,8 @@ func (p *Program) EnterAltScreen() { func (p *Program) ExitAltScreen() { if p.renderer != nil { p.renderer.exitAltScreen() + } else { + p.startupOptions &^= withAltScreen } } @@ -168,7 +172,11 @@ func (p *Program) ExitAltScreen() { // // Deprecated: Use the WithMouseCellMotion ProgramOption instead. func (p *Program) EnableMouseCellMotion() { - p.renderer.enableMouseCellMotion() + if p.renderer != nil { + p.renderer.enableMouseCellMotion() + } else { + p.startupOptions |= withMouseCellMotion + } } // DisableMouseCellMotion disables Mouse Cell Motion tracking. This will be @@ -176,7 +184,11 @@ func (p *Program) EnableMouseCellMotion() { // // Deprecated: The mouse will automatically be disabled when the program exits. func (p *Program) DisableMouseCellMotion() { - p.renderer.disableMouseCellMotion() + if p.renderer != nil { + p.renderer.disableMouseCellMotion() + } else { + p.startupOptions &^= withMouseCellMotion + } } // EnableMouseAllMotion enables mouse click, release, wheel and motion events, @@ -185,7 +197,11 @@ func (p *Program) DisableMouseCellMotion() { // // Deprecated: Use the WithMouseAllMotion ProgramOption instead. func (p *Program) EnableMouseAllMotion() { - p.renderer.enableMouseAllMotion() + if p.renderer != nil { + p.renderer.enableMouseAllMotion() + } else { + p.startupOptions |= withMouseAllMotion + } } // DisableMouseAllMotion disables All Motion mouse tracking. This will be @@ -193,10 +209,20 @@ func (p *Program) EnableMouseAllMotion() { // // Deprecated: The mouse will automatically be disabled when the program exits. func (p *Program) DisableMouseAllMotion() { - p.renderer.disableMouseAllMotion() + if p.renderer != nil { + p.renderer.disableMouseAllMotion() + } else { + p.startupOptions &^= withMouseAllMotion + } } // SetWindowTitle sets the terminal window title. +// +// Deprecated: Use the SetWindowTitle command instead. func (p *Program) SetWindowTitle(title string) { - p.renderer.setWindowTitle(title) + if p.renderer != nil { + p.renderer.setWindowTitle(title) + } else { + p.startupTitle = title + } } diff --git a/vendor/github.com/charmbracelet/bubbletea/tea.go b/vendor/github.com/charmbracelet/bubbletea/tea.go index 0915d1a..15f80f1 100644 --- a/vendor/github.com/charmbracelet/bubbletea/tea.go +++ b/vendor/github.com/charmbracelet/bubbletea/tea.go @@ -131,6 +131,10 @@ type Program struct { // treated as bits. These options can be set via various ProgramOptions. startupOptions startupOptions + // startupTitle is the title that will be set on the terminal when the + // program starts. + startupTitle string + inputType inputType ctx context.Context @@ -490,6 +494,9 @@ func (p *Program) Run() (Model, error) { } // Honor program startup options. + if p.startupTitle != "" { + p.renderer.setWindowTitle(p.startupTitle) + } if p.startupOptions&withAltScreen != 0 { p.renderer.enterAltScreen() } diff --git a/vendor/github.com/charmbracelet/x/ansi/style.go b/vendor/github.com/charmbracelet/x/ansi/style.go index 3342185..96e3c53 100644 --- a/vendor/github.com/charmbracelet/x/ansi/style.go +++ b/vendor/github.com/charmbracelet/x/ansi/style.go @@ -134,6 +134,11 @@ func (s Style) NoReverse() Style { return append(s, NoReverseAttr) } +// NoConceal appends the no conceal style attribute to the style. +func (s Style) NoConceal() Style { + return append(s, NoConcealAttr) +} + // NoStrikethrough appends the no strikethrough style attribute to the style. func (s Style) NoStrikethrough() Style { return append(s, NoStrikethroughAttr) @@ -192,6 +197,7 @@ const ( NoUnderlineAttr Attr = "24" NoBlinkAttr Attr = "25" NoReverseAttr Attr = "27" + NoConcealAttr Attr = "28" NoStrikethroughAttr Attr = "29" DefaultForegroundColorAttr Attr = "39" DefaultBackgroundColorAttr Attr = "49" diff --git a/vendor/modules.txt b/vendor/modules.txt index c8bc6dd..2392ce8 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,10 +1,10 @@ # github.com/atotto/clipboard v0.1.4 ## explicit github.com/atotto/clipboard -# github.com/charmbracelet/bubbletea v0.26.3 +# github.com/charmbracelet/bubbletea v0.26.4 ## explicit; go 1.18 github.com/charmbracelet/bubbletea -# github.com/charmbracelet/x/ansi v0.1.1 +# github.com/charmbracelet/x/ansi v0.1.2 ## explicit; go 1.18 github.com/charmbracelet/x/ansi github.com/charmbracelet/x/ansi/parser