From f4da99052408347d78700fc2d91ec17b62f696e9 Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Thu, 17 Feb 2005 17:30:20 +0300 Subject: [PATCH] (no message) --- .../com/intellij/codeInsight/editorActions/SelectWordUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/source/com/intellij/codeInsight/editorActions/SelectWordUtil.java b/source/com/intellij/codeInsight/editorActions/SelectWordUtil.java index 7ff47096713e..4334b76430b1 100644 --- a/source/com/intellij/codeInsight/editorActions/SelectWordUtil.java +++ b/source/com/intellij/codeInsight/editorActions/SelectWordUtil.java @@ -295,6 +295,7 @@ public class SelectWordUtil { } private static TextRange getWordSelectionRange(CharSequence editorText, int cursorOffset) { + if (editorText.length() == 0) return null; if (cursorOffset > 0 && !Character.isJavaIdentifierPart(editorText.charAt(cursorOffset)) && Character.isJavaIdentifierPart(editorText.charAt(cursorOffset - 1))) { cursorOffset--;