Skip to content

Commit feaf951

Browse files
Ignacio Romero ZurbuchenIgnacio Romero
Ignacio Romero Zurbuchen
authored and
Ignacio Romero
committed
Dismisses the auto-completion mode when selecting text while auto-completing
1 parent 94e4f56 commit feaf951

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Source/Classes/SLKTextViewController.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,14 @@ - (void)textSelectionDidChange
656656
}
657657

658658
// Skips if the loupe is visible or if there is a real text selection
659-
if (self.textView.isLoupeVisible || self.textView.isTrackpadEnabled || self.textView.selectedRange.length > 0) {
659+
if (self.textView.isLoupeVisible || self.textView.isTrackpadEnabled) {
660+
return;
661+
}
662+
663+
if (self.textView.selectedRange.length > 0) {
664+
if (self.isAutoCompleting) {
665+
[self cancelAutoCompletion];
666+
}
660667
return;
661668
}
662669

0 commit comments

Comments
 (0)