From f2b67966cec90c9b00fc764b7d6352813137651a Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Mon, 7 Sep 2015 22:16:22 +0300 Subject: [PATCH] EA-72489 #EA-72489 Fixed --- .../jetbrains/kotlin/idea/completion/LookupCancelWatcher.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/LookupCancelWatcher.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/LookupCancelWatcher.kt index 25b8d48f449..d74cf5a1995 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/LookupCancelWatcher.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/LookupCancelWatcher.kt @@ -82,7 +82,9 @@ class LookupCancelWatcher(project: Project) : AbstractProjectComponent(project) val offset = lookup.currentItem?.getUserData(AUTO_POPUP_AT) if (offset != null) { lastReminiscence?.dispose() - lastReminiscence = Reminiscence(lookup.editor, offset) + if (offset <= lookup.editor.document.textLength) { + lastReminiscence = Reminiscence(lookup.editor, offset) + } } } }