Skip to content

Commit

Permalink
Merge pull request #329 from lampmanyao/main
Browse files Browse the repository at this point in the history
fix crash when apple pencil touch the screen
  • Loading branch information
migueldeicaza committed Nov 5, 2023
2 parents a026d79 + 1da2bde commit 6b9d7dc
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 6b9d7dc

Please sign in to comment.