[pull] master from charmbracelet:master#80
Open
pull[bot] wants to merge 243 commits intopsy-repos-go:masterfrom
Open
[pull] master from charmbracelet:master#80pull[bot] wants to merge 243 commits intopsy-repos-go:masterfrom
pull[bot] wants to merge 243 commits intopsy-repos-go:masterfrom
Conversation
Pull Request Test Coverage Report for Build 5319312652
💛 - Coveralls |
Instead of reading messages in an array and then sending them into a channel, this version of key.go writes to the channel directly.
This reverts commit ea7ceb7.
…tories (#803) * feat: autocompletion with charmbracelet repositories * chore(deps): bump bubbles
From the Go docs: "If the map is nil, the number of iterations is 0." [1] Therefore, an additional nil check for before the loop is unnecessary. [1]: https://go.dev/ref/spec#For_range Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* fix: race changing ignoreSignals * fix: atomic.Uint32
) Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](stefanzweifel/git-auto-commit-action@v4...v5) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Use Render instead of Write/WriteString
Only disable enabled capabilities. Keep track of mouse mode state.
Use Mode/SetMode instead of EnableAltScreenBuffer/DisableAltScreenBuffer etc. This uses less code and makes it more usable in the future to accommodate for more terminal capabilities and modes.
This adds the ability to use a custom renderer using a modified version
of the existing `renderer` interface. This also keeps track of enabled
capabilities and ensure they are turned off on program exit. It only
turns off enabled capabilities rather.
The new API looks like:
```go
// Renderer is the interface for Bubble Tea renderers.
type Renderer interface {
// Close closes the renderer and flushes any remaining data.
Close() error
// Render renders a frame to the output.
Render(string) error
// SetOutput sets the output for the renderer.
SetOutput(io.Writer)
// Flush flushes the renderer's buffer to the output.
Flush() error
// InsertAbove inserts lines above the current frame. This only works in
// inline mode.
InsertAbove(string) error
// Resize sets the size of the terminal.
Resize(w int, h int)
// Request a full re-render. Note that this will not trigger a render
// immediately. Rather, this method causes the next render to be a full
// Repaint. Because of this, it's safe to call this method multiple times
// in succession.
Repaint()
// ClearScreen clear the terminal screen. This should always have the same
// behavior as the "clear" command which is equivalent to `CSI 2 J` and
// `CSI H`.
ClearScreen()
// SetMode sets a terminal mode on/off. The mode argument is an int
// consisting of the mode identifier.
// For example, to set alt-screen mode, you would call SetMode(1049, true).
SetMode(mode int, on bool)
// Mode returns whether the render has a mode enabled.
// For example, to check if alt-screen mode is enabled, you would call
// Mode(1049).
Mode(mode int) bool
}
```
---
This also introduces some performance gains by not writing unnecessary
sequences on enable/disable terminal modes. For example, we always hide
the cursor when the program runs, it doesn't make sense to write the
sequence again when the model sends a `HideCursor` command, we already
know it's hidden. Don't _always_ disable mouse if it wasn't enabled in
the first place.
…#1099) Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.2.1 to 0.2.2. - [Release notes](https://github.com/charmbracelet/x/releases) - [Commits](charmbracelet/x@ansi/v0.2.1...ansi/v0.2.2) --- updated-dependencies: - dependency-name: github.com/charmbracelet/x/ansi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Hack! This forces a bg/fg query on the default os.Stdout and os.Stdin before starting any bubbletea program. Otherwise, programs might hang before the query finishes. This is because at that point, the bubbletea already acquired the terminal os.Stdin and termenv cannot read from it. The termenv query timeout can be adjusted using `termenv.OSCTimeout`. Note that this will only work for the default IO i.e. os.Stdout and os.Stdin. docs: copyedits in Lip Gloss/Termenv workaround for clarity Co-authored-by: Christian Rocha <christian@rocha.is>
* feat: add mode 2027 grapheme clustering stubs This adds the necessary stubs to make mode 2027 (grapheme clustering) work on Bubble Tea with renderers that support it. * fix: screen grapheme clustering tests
Signed-off-by: cuibuwei <cuibuwei@gmail.com>
When read without the comma, it lets the user think that there are two tutorials covering the topic of commands. But instead the intention is to say that is the second tutorial of the series of bubbletea tutorials.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )