Skip to content

Commit

Permalink
fix crash when apple pencil touch the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
lampmanyao committed Nov 5, 2023
1 parent a026d79 commit 1da2bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SwiftTerm/iOS/iOSTextInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extension TerminalView: UITextInput {
}

public func text(in range: UITextRange) -> String? {
let r = range as! xTextRange
guard let r = range as? xTextRange else { return "" }

if textInputStorage.count >= max (r._start, r._end) {
let res = String (textInputStorage [r._start..<r._end])
Expand Down

0 comments on commit 1da2bde

Please sign in to comment.