-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up the code around STInsertionPointProtocol (#41)
This PR removes unnecessary availability checks and downcast to the concrete implementation of `STInsertionPointProtocol` by moving the `color` property into `STInsertionPointProtocol` and accessing it directly over the type-erased `textInsertionIndicator: STInsertionPointProtocol`. Since Apple declare the `NSTextInsertionIndicator.color` as `NSColor!`, it's impossible to reuse the same name for property as `NSColor` and `NSColor!` are different in the eyes of compiler, therefore the `color` had to be declared as `insertionPointColor` within the `STInsertionPointProtocol` protocol to workaround that.
- Loading branch information
Showing
1 changed file
with
20 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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