Skip to content

Commit

Permalink
Sync System Cursor Animation (CodeEditApp#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoolwinter authored Nov 10, 2024
1 parent 2b0c29e commit 013566b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ public class TextSelectionManager: NSObject {
if didUpdate {
delegate?.setNeedsDisplay()
cursorTimer.resetTimer()
resetSystemCursorTimers()
}
}

private func resetSystemCursorTimers() {
guard #available(macOS 14, *) else { return }
for cursorView in textSelections.compactMap({ $0.view as? NSTextInsertionIndicator }) {
let frame = cursorView.frame
cursorView.frame = .zero
cursorView.frame = frame
}
}

Expand Down

0 comments on commit 013566b

Please sign in to comment.