mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 15:41:26 +07:00
Java: fix Extend Selection on empty text block (IDEA-372040)
GitOrigin-RevId: a47f4128f616b8b4921b81708daaa1839f0fa3f2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
49ace10031
commit
5782ec13a0
+3
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInsight.editorActions.wordSelection;
|
||||
|
||||
import com.intellij.codeInsight.editorActions.SelectWordUtil;
|
||||
@@ -72,12 +72,12 @@ public final class LiteralSelectioner extends AbstractBasicBackBasicSelectioner
|
||||
for (; end >= start; end--) {
|
||||
char c = text.charAt(end);
|
||||
if (c == '\n' || !Character.isWhitespace(c)) {
|
||||
end += 1;
|
||||
end++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return new TextRange(start, end);
|
||||
return end < start ? range : new TextRange(start, end);
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException();
|
||||
|
||||
Reference in New Issue
Block a user