Repository navigation
fix(viewport): leave lines that end inside a style to lipgloss - #27
Merged
Merged
Conversation
Bumps the go group with 4 updates: charm.land/lipgloss/v2, [golang.org/x/sync](https://github.com/golang/sync), [golang.org/x/text](https://github.com/golang/text) and [modernc.org/sqlite](https://gitlab.com/cznic/sqlite). Updates `charm.land/lipgloss/v2` from 2.0.6 to 2.1.0 Updates `golang.org/x/sync` from 0.24.0 to 0.25.0 - [Commits](golang/sync@v0.24.0...v0.25.0) Updates `golang.org/x/text` from 0.43.0 to 0.44.0 - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.43.0...v0.44.0) Updates `modernc.org/sqlite` from 1.61.1 to 1.62.0 - [Release notes](https://gitlab.com/cznic/sqlite/tags) - [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md) - [Commits](https://gitlab.com/cznic/sqlite/compare/v1.61.1...v1.62.0) --- updated-dependencies: - dependency-name: charm.land/lipgloss/v2 dependency-version: 2.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go - dependency-name: golang.org/x/sync dependency-version: 0.25.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go - dependency-name: golang.org/x/text dependency-version: 0.44.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go - dependency-name: modernc.org/sqlite dependency-version: 1.62.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go ... Signed-off-by: dependabot[bot] <support@github.com>
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.
Replaces #23: Dependabot's go group bump (lipgloss 2.1.0, x/sync 0.25.0, x/text 0.44.0, modernc sqlite 1.62.0, with its nix vendorHash) plus the fix its tests needed.
With a width set, lipgloss 2.1.0 closes a style a line leaves on (
\x1b[mbefore the padding) and opens it again on the next line; an unterminated hyperlink gets closed too.padBlock, the viewport's fast path that promises lipgloss's exact bytes, only appended blanks, soTestPadBlockMatchesLipglossfailed on both OSes.padBlocknow leaves such a line to lipgloss: it takes the fast path only when the line's last SGR is a full reset and its last hyperlink is closed (leavesStyleOpen). Copying lipgloss's close-and-reopen rule instead would tie the fast path to its internals again; the panes look the same either way.Tests:
TestPadBlockMatchesLipglossfails on #23 and passes here; it gained lines ending in a partial SGR reset, another CSI and an open and a closed hyperlink.go test ./internal/viewportpasses. Not measured:padBlockhas no benchmark; the check is twostrings.LastIndexcalls per line next to the width scan it already does.