diff --git a/TagNameDetection/TagNameDetection.xcodeproj/project.xcworkspace/xcuserdata/datt.xcuserdatad/UserInterfaceState.xcuserstate b/TagNameDetection/TagNameDetection.xcodeproj/project.xcworkspace/xcuserdata/datt.xcuserdatad/UserInterfaceState.xcuserstate index 63047e7..b8277aa 100644 Binary files a/TagNameDetection/TagNameDetection.xcodeproj/project.xcworkspace/xcuserdata/datt.xcuserdatad/UserInterfaceState.xcuserstate and b/TagNameDetection/TagNameDetection.xcodeproj/project.xcworkspace/xcuserdata/datt.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TagNameDetection/TagNameDetection.xcodeproj/xcuserdata/datt.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/TagNameDetection/TagNameDetection.xcodeproj/xcuserdata/datt.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 5339211..94be158 100644 --- a/TagNameDetection/TagNameDetection.xcodeproj/xcuserdata/datt.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/TagNameDetection/TagNameDetection.xcodeproj/xcuserdata/datt.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -52,7 +52,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "TagNameDetection/DPTagTextView.swift" - timestampString = "566132487.207594" + timestampString = "566802747.229502" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "122" @@ -68,7 +68,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "TagNameDetection/DPTagTextView.swift" - timestampString = "566132487.2076499" + timestampString = "566802747.229833" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "208" @@ -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"> @@ -100,7 +100,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "TagNameDetection/DPTagTextView.swift" - timestampString = "566132487.207747" + timestampString = "566802747.230225" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "174" diff --git a/TagNameDetection/TagNameDetection/DPTagTextView.swift b/TagNameDetection/TagNameDetection/DPTagTextView.swift index f053118..94a764c 100644 --- a/TagNameDetection/TagNameDetection/DPTagTextView.swift +++ b/TagNameDetection/TagNameDetection/DPTagTextView.swift @@ -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 }