Repository navigation
fix(editor): keep line numbers and the find panel inside the editor - #3591
Merged
Merged
Conversation
On macOS 14 and later nothing below the editor's root view clipped, so the document-tall gutter painted line numbers of rows scrolled out of view over the view above it, and the find panel slid over it too. Clip the find view controller's view, the editor's outermost view.
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.
Why
In a read-only code view under a toolbar, such as the EXPLAIN result in Raw mode, scrolling the text drew the line numbers of rows above the view over the toolbar. The editor's find panel slid over it the same way. Since macOS 14,
NSView.clipsToBoundsdefaults to false. The gutter is a document-tall floating subview that AppKit places beside the clip view, and nothing between it and the window clipped it. The main query editor only escaped because its host clips.Change
Verified
TextViewControllerClippingTestsfails onmain(3 of 3) and passes here. All 739 TableProEditor package tests pass. Checked in a Debug build against PostgreSQL.Screenshots
Not in this PR
DDLTextView,SQLCodePreviewandTriggerEditorViewkeep the old Code folding setting until their font or the theme changes.