Fix down arrow key not working after font size change by objectiveous · Pull Request #364 · CodeEditApp/CodeEditSourceEditor
The cached _estimateLineHeight in TextLayoutManager was never invalidated when the font changed. The vertical cursor movement calculation uses this estimate to compute the target y-coordinate, and after enough font size increases the stale (too small) value prevented moveDown: from crossing into the next line. Up arrow was unaffected because subtracting from the line top always lands in the previous line. Fix: re-assign renderDelegate after font/lineHeight changes to trigger its didSet which clears the cached estimate. Also handle arrow keys explicitly in the event monitor and add Ctrl+N/P (moveDown/moveUp) to handleCommand for robustness. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
objectiveous added a commit to objectiveous/CodeEditSourceEditor that referenced this pull request
Feb 8, 2026- Extract renderDelegate cache invalidation into refreshEstimatedLineHeightCache() helper - Normalize modifier flags to [shift, control, option, command] so Ctrl-N/P work with Caps Lock/Fn - Fix handleArrowKey doc comment to accurately describe supported modifier combinations - Centralize key code constants (tab, downArrow, upArrow) as static properties Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract renderDelegate cache invalidation into refreshEstimatedLineHeightCache() helper - Normalize modifier flags to [shift, control, option, command] so Ctrl-N/P work with Caps Lock/Fn - Fix handleArrowKey doc comment to accurately describe supported modifier combinations - Centralize key code constants (tab, downArrow, upArrow) as static properties Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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