mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-110607 Double clicking space/tab characters should select all space/tab characters until it encounters another type of character
Better `Extend Selection` behavior when some text is already selected GitOrigin-RevId: ca57c876f49590eb6693b3e1cc7a832e758a88db
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8a71f62c92
commit
dd712b6535
@@ -271,6 +271,8 @@ public final class SelectWordUtil {
|
||||
* by any side of a caret at specified cursorPosition
|
||||
*/
|
||||
public static boolean canWhiteSpaceBeExpanded(PsiWhiteSpace psiWhiteSpace, int cursorPosition, Caret caret) {
|
||||
if (caret.hasSelection() && psiWhiteSpace.getTextRange().contains(caret.getSelectionRange())) return false;
|
||||
|
||||
int beforeOffset = caret.hasSelection()? caret.getSelectionStart() : cursorPosition;
|
||||
Character charBeforeCursor = getCharBeforeCursorInPsiElement(psiWhiteSpace, beforeOffset);
|
||||
if (charBeforeCursor != null && isExpandableWhiteSpace(charBeforeCursor)) return true;
|
||||
|
||||
Reference in New Issue
Block a user