Repository navigation
Conversation
Fixes highlighting
cursorIndex and selectionRange count the EXPANDED text - the text with the line breaks word wrapping inserted, as getTextPos's documentation says - and every operation on the text itself converts through getTextPos first. Ctrl+C and Ctrl+X did not: they took `text.substr(selectionRange.start, selectionRange.length)` straight from the text, so on any wrapped line the clipboard was given a copy shifted by one character per wrap above the selection, while cutSelection removed the correct characters. Cutting a word and pasting it back therefore lost a letter. getSelectedText already does the conversion, so both now use it. getWordEnd had the mirror of the same confusion: `ret` is a position in the text, but it was bounded by getTextLength(), which is the expanded length and so longer than the text by one per inserted break. A double-click on a word at the end of a wrapped text selected one character past the end of it.
When a break char already overflows maxWidth, lastBreak is set to i - 1, which can point before the start of the current line (lastPos - 1). The rewind branch then flushes an empty line without advancing i or lastPos, and the loop repeats forever. This happens e.g. with maxWidth = 0 (layouts that measure at zero width first) and CJK text, or TextInput with trimTrailingSpaces = false. Only rewind to a break point inside the current line, so every rewind consumes at least one character. lastPos is never negative, so this still implies the old lastBreak >= 0 check. Fixes HeapsIO#1347 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re's origin Object.drawFilters pushes the filter texture with the (xMin, yMin) of its bounds as the target's start, but setRZ mapped a zone through the filter matrix (relative to the filtered object's origin, already in texture pixels) and then through the scene viewport. The zone was therefore offset by (xMin, yMin) - e.g. 2px up and left under a Blur/Glow with radius 1 - and scaled a second time when the viewport is scaled. Visible as a single-line TextInput, drawn inside any filtered parent, having the descenders of its text clipped off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes highlighting and word wrap