Repository navigation
Conversation
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.
Refs #2071.
In a one-row wrapped input window, the cursor can land on the next visual row while the text before it still fits on the previous row. The window then scrolls to an earlier row and the renderer puts the cursor at the screen origin. Include the character under the cursor when choosing the visible rows.
This follows yuxino’s cursor measurement in #2174. gyanu2507 also identified the exact-wrap boundary in #2084.
Added layout regressions for a space at the wrap, the insertion point at the end of a line, a wide character and a continuation prefix. In a real macOS tmux terminal, both 3.0.53 and the upstream base misplaced the cursor while typing and when resizing to 28 and 21 columns. The candidate kept the cursor in the input row in all 417 inspected frames. Each session returned the complete input. The Python test suite passed 160 tests.
Tightly packed wide characters at odd widths can still make the height estimate undercount rows when each wrap leaves a cell unused.
Codex assisted with development and verification.