[mod-commands] PsiUpdateImpl: moveCaretTo to clear the selection if current one is outside the new caret position

GitOrigin-RevId: 8f4b05f441a909599aea8ee00f940c8e051deca9
This commit is contained in:
Tagir Valeev
2024-03-21 21:18:25 +00:00
committed by intellij-monorepo-bot
parent fd82827251
commit 5bf6475396
@@ -452,6 +452,9 @@ final class PsiUpdateImpl {
offset = instance.injectedToHost(file, offset);
}
myCaretOffset = myCaretVirtualEnd = offset;
if (!mySelection.containsOffset(offset)) {
mySelection = TextRange.create(offset, offset);
}
}
@Override