diff --git a/extensions/intellij/.run/Run Extension.run.xml b/extensions/intellij/.run/Run Extension.run.xml index b63167cdeb..7980ff2324 100644 --- a/extensions/intellij/.run/Run Extension.run.xml +++ b/extensions/intellij/.run/Run Extension.run.xml @@ -1,31 +1,31 @@ - - - - - - - true - true - false - false - - + + + + + + + true + true + false + false + + \ No newline at end of file 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