From cb0b32280bd1b3fe1be3de7b765c8cda21f5a0a8 Mon Sep 17 00:00:00 2001 From: John Brant Date: Fri, 19 Jul 2024 09:22:38 -0500 Subject: [PATCH] [feenkcom/gtoolkit#3726] check completion position is in text range --- .../GtPharoCompletionStrategy.class.st | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/GToolkit-Pharo-Completer/GtPharoCompletionStrategy.class.st b/src/GToolkit-Pharo-Completer/GtPharoCompletionStrategy.class.st index f7db5c53..a33f5331 100644 --- a/src/GToolkit-Pharo-Completer/GtPharoCompletionStrategy.class.st +++ b/src/GToolkit-Pharo-Completer/GtPharoCompletionStrategy.class.st @@ -115,8 +115,7 @@ GtPharoCompletionStrategy >> gtViewChildrenFor: aView [ { #category : #testing } GtPharoCompletionStrategy >> hasCompletionsAt: anInteger in: aText [ | char | - anInteger < 1 - ifTrue: [ ^ false ]. + (anInteger < 1 or: [ anInteger > aText size ]) ifTrue: [ ^ false ]. char := aText at: anInteger. ^ char isLetter or: [ char isDigit ] ]