Fix in completion - do not autocomplete when prefix does not match selected item exactly.
--- a/SmallSense__CompletionController.st Wed Apr 02 23:42:42 2014 +0200
+++ b/SmallSense__CompletionController.st Thu Apr 03 23:06:01 2014 +0200
@@ -240,8 +240,11 @@
matches size == 1 ifTrue:[
completionView selection: matches anElement.
completeIfUnambiguous ifTrue:[
- self complete.
- ^ true
+ "/ Do complete only if prefix matches!!
+ (matches anElement stringToComplete startsWith: prefix) ifTrue:[
+ self complete.
+ ^ true
+ ].
]
] ifFalse:[
| selection |
@@ -259,7 +262,7 @@
^ false.
"Created: / 27-09-2013 / 16:16:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 02-04-2014 / 23:32:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 03-04-2014 / 22:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CompletionController methodsFor:'private-API'!