Repository navigation
transcript: stop the newest lines of a reply being cut off - #15
Merged
Merged
Conversation
Three things hid the end of the transcript. Glamour wraps prose but never breaks a token, so a long path, URL, inline code span or code line reached the viewport wider than it. The viewport's View wraps such a line again and then cuts to its height, so every extra row pushed one of the newest rows off the bottom, and scrolling could not bring it back. fitWidth now breaks every rendered entry to the viewport width. Tabs are expanded first, because ansi.StringWidth and glamour count a tab as no cells while lipgloss draws four. A link split by a break stays a link on each line, and a colour cut by a break is closed. A viewport that got shorter (a taller prompt, the compact bar) kept its offset, so the rows it lost were the newest ones. resizeViewport now re-pins to the bottom while following. Tool output arrives as the program wrote it to a terminal, so cursor-up, erase-line and \r reached the frame and overwrote rows already drawn. termSafe keeps text, newlines, tabs and SGR colour and drops everything else. Only ESC starts a sequence, as in a UTF-8 terminal, so combining marks survive and a cut-off rune becomes U+FFFD instead of swallowing the text after it. Every entry now goes through displayEntry, the one owner of that pipeline.
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.
Three things hid the end of the transcript.
Glamour wraps prose but never breaks a token, so a long path, URL, inline
code span or code line reached the viewport wider than it. The viewport's
View wraps such a line again and then cuts to its height, so every extra
row pushed one of the newest rows off the bottom, and scrolling could not
bring it back. fitWidth now breaks every rendered entry to the viewport
width. Tabs are expanded first, because ansi.StringWidth and glamour count
a tab as no cells while lipgloss draws four. A link split by a break stays
a link on each line, and a colour cut by a break is closed.
A viewport that got shorter (a taller prompt, the compact bar) kept its
offset, so the rows it lost were the newest ones. resizeViewport now
re-pins to the bottom while following.
Tool output arrives as the program wrote it to a terminal, so cursor-up,
erase-line and \r reached the frame and overwrote rows already drawn.
termSafe keeps text, newlines, tabs and SGR colour and drops everything
else. Only ESC starts a sequence, as in a UTF-8 terminal, so combining
marks survive and a cut-off rune becomes U+FFFD instead of swallowing the
text after it.
Every entry now goes through displayEntry, the one owner of that pipeline.