Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
No need for this legacy check, before we even disabled auto-correctio…
Browse files Browse the repository at this point in the history
…n when auto-completing. It also assumed wrong by thinking that a longer string meant auto-correction replacement.

This fixes issues where auto-completing was still enabled and pasting content would be ignored.
  • Loading branch information
Ignacio Romero Zurbuchen committed Apr 21, 2016
1 parent 6974fc7 commit f11bc55
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Source/SLKTextViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1865,11 +1865,6 @@ - (BOOL)textView:(SLKTextView *)textView shouldChangeTextInRange:(NSRange)range

BOOL newWordInserted = ([text rangeOfCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].location != NSNotFound);

// It should not change if auto-completion is active and trying to replace with an auto-correction suggested text.
if (self.isAutoCompleting && text.length > 1) {
return NO;
}

// Records text for undo for every new word
if (newWordInserted) {
[textView slk_prepareForUndo:@"Word Change"];
Expand Down

0 comments on commit f11bc55

Please sign in to comment.