From fdb9f6ef82d6de47a91696b42cdad35d54f8249c Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 7 Nov 2013 17:35:20 +0100 Subject: [PATCH] ctrl+w shouldn't choke on unclosed argument lists (EA-51589) --- .../editorActions/wordSelection/ListSelectioner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/editorActions/wordSelection/ListSelectioner.java b/java/java-impl/src/com/intellij/codeInsight/editorActions/wordSelection/ListSelectioner.java index 2404f21a17b0..a608c6e8b449 100644 --- a/java/java-impl/src/com/intellij/codeInsight/editorActions/wordSelection/ListSelectioner.java +++ b/java/java-impl/src/com/intellij/codeInsight/editorActions/wordSelection/ListSelectioner.java @@ -50,7 +50,9 @@ public class ListSelectioner extends BasicSelectioner { } List result = new ArrayList(); - result.add(new TextRange(start, end)); + if (start != 0 && end != 0) { + result.add(new TextRange(start, end)); + } return result; } }