davidbalbert / Watt

A high performance text editor for macOS.
MIT License
57 stars 2 forks source link

Use NSTextInsertionIndicator on macOS Sonoma #44

Open davidbalbert opened 1 year ago

davidbalbert commented 1 year ago

I believe this requires calling the following methods on NSTextInputContext.

N.b. "This method should be called before -invalidateCharacterCoordinates."

/* Notifies the text input client will be continuous updated due to user action. This includes scrolling, resizing, zooming, and any other action modifying the the geometry information of text selection while displaying the content.

    This method should be called before -invalidateCharacterCoordinates.
 */
- (void)textInputClientWillStartScrollingOrZooming API_AVAILABLE(macos(14.0));

/* Notifies the text input client was continuous updated due to user action. This includes scrolling, resizing, zooming, and any other action modifying the the geometry information of text selection while displaying the content.

  This method should be called after -invalidateCharacterCoordinates. */
- (void)textInputClientDidEndScrollingOrZooming API_AVAILABLE(macos(14.0));