fix: Border.GetTopSize/GetBottomSize return row count, not rune width#672
Open
kimjune01 wants to merge 21 commits into
Open
fix: Border.GetTopSize/GetBottomSize return row count, not rune width#672kimjune01 wants to merge 21 commits into
kimjune01 wants to merge 21 commits into
Conversation
…armbracelet#618) Bumps the all group with 2 updates in the / directory: [github.com/aymanbagabas/go-udiff](https://github.com/aymanbagabas/go-udiff) and [github.com/clipperhouse/displaywidth](https://github.com/clipperhouse/displaywidth). Updates `github.com/aymanbagabas/go-udiff` from 0.3.1 to 0.4.0 - [Release notes](https://github.com/aymanbagabas/go-udiff/releases) - [Commits](aymanbagabas/go-udiff@v0.3.1...v0.4.0) Updates `github.com/clipperhouse/displaywidth` from 0.9.0 to 0.11.0 - [Release notes](https://github.com/clipperhouse/displaywidth/releases) - [Changelog](https://github.com/clipperhouse/displaywidth/blob/main/CHANGELOG.md) - [Commits](clipperhouse/displaywidth@v0.9.0...v0.11.0) --- updated-dependencies: - dependency-name: github.com/aymanbagabas/go-udiff dependency-version: 0.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: github.com/clipperhouse/displaywidth dependency-version: 0.11.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fix: handle partial reads in queryTerminal
Co-authored-by: aymanbagabas <3187948+aymanbagabas@users.noreply.github.com>
Bumps the all group with 2 updates: [github.com/aymanbagabas/go-udiff](https://github.com/aymanbagabas/go-udiff) and [golang.org/x/sys](https://github.com/golang/sys). Updates `github.com/aymanbagabas/go-udiff` from 0.4.0 to 0.4.1 - [Release notes](https://github.com/aymanbagabas/go-udiff/releases) - [Commits](aymanbagabas/go-udiff@v0.4.0...v0.4.1) Updates `golang.org/x/sys` from 0.41.0 to 0.42.0 - [Commits](golang/sys@v0.41.0...v0.42.0) --- updated-dependencies: - dependency-name: github.com/aymanbagabas/go-udiff dependency-version: 0.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: golang.org/x/sys dependency-version: 0.42.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) The current algorithm which calculates the first and last visible rows does not take into account content wrapping (and has a number of other problematic edge cases). This is partially due to `expandRowHeights` actually not updating `rowHeights`, but also due to a simplified implementation which does not try to take them into account. Rewrite the visible rows calculation to take content wrapping into account, making sure we consider the actual row height that will be used when rendering the table.
Co-authored-by: rohan436 <rohan.santhoshkumar@googlemail.com>
…oup (charmbracelet#630) Bumps the all group with 1 update: [github.com/charmbracelet/colorprofile](https://github.com/charmbracelet/colorprofile). Updates `github.com/charmbracelet/colorprofile` from 0.4.2 to 0.4.3 - [Release notes](https://github.com/charmbracelet/colorprofile/releases) - [Commits](charmbracelet/colorprofile@v0.4.2...v0.4.3) --- updated-dependencies: - dependency-name: github.com/charmbracelet/colorprofile dependency-version: 0.4.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: rohan436 <rohan.santhoshkumar@googlemail.com>
…charmbracelet#640) Bumps the all group with 1 update: [github.com/lucasb-eyer/go-colorful](https://github.com/lucasb-eyer/go-colorful). Updates `github.com/lucasb-eyer/go-colorful` from 1.3.0 to 1.4.0 - [Release notes](https://github.com/lucasb-eyer/go-colorful/releases) - [Changelog](https://github.com/lucasb-eyer/go-colorful/blob/master/CHANGELOG.md) - [Commits](lucasb-eyer/go-colorful@v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: github.com/lucasb-eyer/go-colorful dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the all group with 1 update: [golang.org/x/sys](https://github.com/golang/sys). Updates `golang.org/x/sys` from 0.42.0 to 0.43.0 - [Commits](golang/sys@v0.42.0...v0.43.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-version: 0.43.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Which seems to happen if stdin/stdout are somehow accidentally not TTYs. Signed-off-by: Justin Chadwell <justin@unikraft.com>
* docs: restore missing diaereses See: charmbracelet#156 * chore(lint): remove deprecated directive
Top and bottom borders always occupy exactly one row regardless of the display width of their rune characters. The previous implementation returned maxRuneWidth of the border parts, which incorrectly reported values >1 when wide-rune characters (e.g. "⏩") were used as corners. This caused GetVerticalBorderSize to overcount, leading to wrong height calculations in Style.Render when borders included wide-rune characters. Fixes charmbracelet#112
The bug (issue charmbracelet#112): GetTopSize/GetBottomSize returned rune width instead of row count. Top/bottom borders always occupy exactly 1 row. Test verification: - main branch: FAIL (returns 2 for wide rune ⏩) - fix branch: PASS (returns 1 correctly) Attestation: main:FAIL fix:PASS TestBorderTopBottomSizeWithWideRune 2026-05-09T16:38:46
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.
Summary
Test plan
Fixes #112