mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 17:43:18 +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) {
|
void applyKeyboardAutocorrection(UITextView * _Nonnull textView) {
|
||||||
|
NSRange rangeCopy = textView.selectedRange;
|
||||||
|
NSRange fakeRange = rangeCopy;
|
||||||
|
if (fakeRange.location != 0) {
|
||||||
|
fakeRange.location--;
|
||||||
|
}
|
||||||
[textView unmarkText];
|
[textView unmarkText];
|
||||||
|
[textView setSelectedRange:fakeRange];
|
||||||
|
[textView setSelectedRange:rangeCopy];
|
||||||
}
|
}
|
||||||
|
|
||||||
@interface AboveStatusBarWindowController : UIViewController
|
@interface AboveStatusBarWindowController : UIViewController
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user