Skip to content

Commit

Permalink
Show I-beam instead of arrow cursor when option key is released
Browse files Browse the repository at this point in the history
Using `NSClipView.documentCursor` instead of `NSCursor.set()` restricts the change to the current window.
  • Loading branch information
ryanbloom authored and cmyr committed Aug 28, 2018
1 parent aa3984a commit c9fb15e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XiEditor/EditViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,9 @@ class EditViewController: NSViewController, EditViewDataSource, FindDelegate, Sc
//MARK: Other system events
override func flagsChanged(with event: NSEvent) {
if event.modifierFlags.contains(.option) {
NSCursor.crosshair.set()
scrollView.contentView.documentCursor = NSCursor.crosshair
} else {
NSCursor.arrow.set()
scrollView.contentView.documentCursor = NSCursor.iBeam
}
}

Expand Down

0 comments on commit c9fb15e

Please sign in to comment.