From 0b3f19afeafe32643313c4db267d28d104ce26d5 Mon Sep 17 00:00:00 2001 From: Douzi Date: Thu, 24 Apr 2025 18:12:40 +0800 Subject: [PATCH] =?UTF-8?q?:children=5Fcrossing:=20Fix=20issue=20where=20I?= =?UTF-8?q?DEA=20jumps=20to=20cursor=20but=20cannot=20locate=20specific=20?= =?UTF-8?q?line=20number=20:children=5Fcrossing:=20=E4=BF=AE=E5=A4=8D=20ID?= =?UTF-8?q?EA=20=E8=B7=B3=E8=BD=AC=E5=88=B0=E5=85=89=E6=A0=87=E4=BD=86?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=AE=9A=E4=BD=8D=E5=85=B7=E4=BD=93=E8=A1=8C?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the `-r` parameter to force opening the file or folder in the existing window. 添加了 `-r` 参数,强制在已有窗口中打开文件或文件夹。 --- .../qczone/switch2cursor/actions/OpenFileInCursorAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt b/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt index bae398d..b01bfe6 100644 --- a/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt +++ b/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt @@ -36,7 +36,7 @@ class OpenFileInCursorAction : AnAction() { arrayOf("open", "-a", "$cursorPath", "cursor://file$filePath:$line:$column") } System.getProperty("os.name").lowercase().contains("windows") -> { - arrayOf("cmd", "/c", "$cursorPath", "--goto", "$filePath:$line:$column") + arrayOf("cmd", "/c", "$cursorPath" , "-r", "--goto", "$filePath:$line:$column") } else -> { arrayOf(cursorPath, "--goto", "$filePath:$line:$column")