Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 31 Aug 2014 23:09:01 +0100
changeset 283 8b3f9ac43523
parent 274 2cfcd8eb9761
child 284 344ac622d401
Fixes for issue #10: Extra characters inserted when typing too fast and complete-if-ambiguous is on Do not complete if there are key-press events in a queue for the text editor.
SmallSense__CompletionController.st
--- a/SmallSense__CompletionController.st	Mon Aug 11 15:58:17 2014 +0100
+++ b/SmallSense__CompletionController.st	Sun Aug 31 23:09:01 2014 +0100
@@ -356,7 +356,7 @@
             | selection |
 
             selection := matches1 anElement.
-            completeIfUnambiguous ifTrue:[
+            (completeIfUnambiguous and: [(editView sensor hasKeyEventFor:editView) not]) ifTrue:[
                 self complete: selection afterKeyPress: keyOrNil.
                 ^ true
             ] ifFalse:[