From 176001104e4f4736af9746c253dc762ca4f4c52f Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 13 Jan 2025 21:27:37 -0800 Subject: [PATCH] Update ContinuePluginSelectionListener.kt --- .../listeners/ContinuePluginSelectionListener.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt index d767912644..adcc86f7f7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt @@ -179,8 +179,8 @@ class ContinuePluginSelectionListener( val lineStartOffset = document.getLineStartOffset(lineNumber) val lineEndOffset = document.getLineEndOffset(lineNumber) val lineText = document.getText(TextRange(lineStartOffset, lineEndOffset)).trimEnd() - val endOfLinePos = LogicalPosition(lineNumber, lineText.length) - return editor.logicalPositionToXY(endOfLinePos).x + val visualPosition = editor.offsetToVisualPosition(lineStartOffset + lineText.length) + return editor.visualPositionToXY(visualPosition).x } val offset = 40