Fix range jumping while editing text
This commit is contained in:
parent
1c8fabbe59
commit
b30b96c48d
|
@ -43,9 +43,11 @@ public class StatusEditorViewModel: NSObject, ObservableObject {
|
|||
|
||||
@Published var statusText = NSMutableAttributedString(string: "") {
|
||||
didSet {
|
||||
let range = selectedRange
|
||||
processText()
|
||||
checkEmbed()
|
||||
textView?.attributedText = statusText
|
||||
selectedRange = range
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue