mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: set ibeam cursor within terminal view
This commit is contained in:
@ -274,6 +274,11 @@ class TerminalSurfaceView_Real: NSView, NSTextInputClient, ObservableObject {
|
|||||||
userInfo: nil))
|
userInfo: nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func resetCursorRects() {
|
||||||
|
discardCursorRects()
|
||||||
|
addCursorRect(frame, cursor: .iBeam)
|
||||||
|
}
|
||||||
|
|
||||||
override func viewDidChangeBackingProperties() {
|
override func viewDidChangeBackingProperties() {
|
||||||
guard let surface = self.surface else { return }
|
guard let surface = self.surface else { return }
|
||||||
|
|
||||||
@ -317,6 +322,8 @@ class TerminalSurfaceView_Real: NSView, NSTextInputClient, ObservableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func mouseMoved(with event: NSEvent) {
|
override func mouseMoved(with event: NSEvent) {
|
||||||
|
NSCursor.iBeam.set()
|
||||||
|
|
||||||
guard let surface = self.surface else { return }
|
guard let surface = self.surface else { return }
|
||||||
|
|
||||||
// Convert window position to view position. Note (0, 0) is bottom left.
|
// Convert window position to view position. Note (0, 0) is bottom left.
|
||||||
|
Reference in New Issue
Block a user