Skip to content

Commit

Permalink
revert: revert back to original code from szmentionsswift to test on …
Browse files Browse the repository at this point in the history
…szweier new implementation
  • Loading branch information
TN-Kenneth committed Feb 16, 2020
1 parent 0b4c88f commit c666cea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Classes/MentionListener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ extension MentionListener /* Private */ {
if searchSpaces {
let startIndex = mentionsTextView.text.utf16.index(mentionsTextView.text.startIndex, offsetBy: location)
let endIndex = mentionsTextView.text.utf16.index(startIndex, offsetBy: NSMaxRange(textView.selectedRange) - location)
if endIndex > startIndex {
mentionString = String(mentionsTextView.text[startIndex ..< endIndex])
}
mentionString = String(mentionsTextView.text[startIndex ..< endIndex])
} else if let stringBeingTyped = stringToSelectedIndex.components(separatedBy: textBeforeTrigger).last,
let stringForMention = stringBeingTyped.components(separatedBy: " ").last,
stringForMention.range(of: trigger, options: .anchored) != nil {
Expand Down

0 comments on commit c666cea

Please sign in to comment.