From 5c6abf1dbbd481e5e09192a36e2dfa2ce71c75ee Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 2 Nov 2017 15:16:06 -0700 Subject: [PATCH] Correct behaviour for rangeForCharacterAtIndex (flutter/engine#4319) Previously it always fell through to a zero-length character range at the specified position. --- .../darwin/ios/framework/Source/FlutterTextInputPlugin.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index f4eb210454a..f5e7de3067c 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -338,7 +338,7 @@ static UITextAutocapitalizationType ToUITextAutocapitalizationType(NSString* inp * text. */ - (NSRange)rangeForCharacterAtIndex:(NSUInteger)index { if (index < self.text.length) - [self.text rangeOfComposedCharacterSequenceAtIndex:index]; + return [self.text rangeOfComposedCharacterSequenceAtIndex:index]; return NSMakeRange(index, 0); }