mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 09:32:46 +00:00
Fix autocorrection
This commit is contained in:
parent
2a09dda7d9
commit
be37c1e3c4
@ -317,7 +317,14 @@ static NSString *TGEncodeText(NSString *string, int key)
|
||||
}
|
||||
|
||||
void applyKeyboardAutocorrection(UITextView * _Nonnull textView) {
|
||||
NSRange rangeCopy = textView.selectedRange;
|
||||
NSRange fakeRange = rangeCopy;
|
||||
if (fakeRange.location != 0) {
|
||||
fakeRange.location--;
|
||||
}
|
||||
[textView unmarkText];
|
||||
[textView setSelectedRange:fakeRange];
|
||||
[textView setSelectedRange:rangeCopy];
|
||||
}
|
||||
|
||||
@interface AboveStatusBarWindowController : UIViewController
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user