Skip to content

Commit

Permalink
Fixes a bug where location of the selection after a spell-checked rep…
Browse files Browse the repository at this point in the history
…lacement is beyond the length of the string.
  • Loading branch information
JaredCrawford committed Apr 11, 2012
1 parent 2e9f108 commit 38d4203
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions EGOTextView/EGOTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,7 @@ - (void)deleteBackward {
[_mutableAttributedString beginEditing];
[_mutableAttributedString deleteCharactersInRange:self.correctionRange];
[_mutableAttributedString endEditing];
selectedNSRange.location = self.correctionRange.location;
self.correctionRange = NSMakeRange(NSNotFound, 0);
selectedNSRange.length = 0;

Expand Down

0 comments on commit 38d4203

Please sign in to comment.