Skip to content

Commit

Permalink
Issue solve #10
Browse files Browse the repository at this point in the history
  • Loading branch information
datt authored and datt committed Dec 18, 2018
1 parent febcd1e commit be35e08
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TagNameDetection/DPTagTextView.swift"
timestampString = "566132487.207594"
timestampString = "566802747.229502"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "122"
Expand All @@ -68,7 +68,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TagNameDetection/DPTagTextView.swift"
timestampString = "566132487.2076499"
timestampString = "566802747.229833"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "208"
Expand All @@ -84,11 +84,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TagNameDetection/DPTagTextView.swift"
timestampString = "566132487.2077"
timestampString = "566802747.230037"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "323"
endingLineNumber = "323"
startingLineNumber = "327"
endingLineNumber = "327"
landmarkName = "textView(_:shouldChangeTextIn:replacementText:)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -100,7 +100,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TagNameDetection/DPTagTextView.swift"
timestampString = "566132487.207747"
timestampString = "566802747.230225"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "174"
Expand Down
8 changes: 5 additions & 3 deletions TagNameDetection/TagNameDetection/DPTagTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,17 @@ class DPTagTextView: UITextView , UITextViewDelegate {
newString.insert(contentsOf: tagPostfix, at: rag.upperBound)
newString.insert(contentsOf: tagPrefix, at: rag.lowerBound)
}
setTxt(newString)



if (text.utf16Count != 0 ) {
selectedRange.location += text.utf16Count
}

selectedRange.length = 0
self.isScrollEnabled = false;
setTxt(newString)
self.isScrollEnabled = true;
textView.selectedRange = selectedRange

hack_shouldIgnorePredictiveInput = false
return false
}
Expand Down

0 comments on commit be35e08

Please sign in to comment.