diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/editor/actions/InsertAtCaretAction.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/editor/actions/InsertAtCaretAction.java index 83ead8fe..015bdd7f 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/editor/actions/InsertAtCaretAction.java +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/editor/actions/InsertAtCaretAction.java @@ -36,7 +36,7 @@ public class InsertAtCaretAction extends TrackableAction { return; } - insertTextAtCaret(mainEditor, locationOnScreen); + insertTextAtCaret(mainEditor); } @Nullable @@ -54,16 +54,11 @@ public class InsertAtCaretAction extends TrackableAction { .orElse(null); } - private void insertTextAtCaret(Editor mainEditor, @Nullable Point locationOnScreen) { + private void insertTextAtCaret(Editor mainEditor) { runUndoTransparentWriteAction(() -> { mainEditor.getDocument().insertString( mainEditor.getCaretModel().getOffset(), editor.getDocument().getText()); - if (locationOnScreen != null) { - OverlayUtil.showInfoBalloon( - "Text successfully inserted at the current cursor position.", - locationOnScreen); - } return null; }); } diff --git a/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/chat/ToolwindowEditorActionLink.kt b/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/chat/ToolwindowEditorActionLink.kt index 702eb123..27ecf29a 100644 --- a/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/chat/ToolwindowEditorActionLink.kt +++ b/src/main/kotlin/ee/carlrobert/codegpt/toolwindow/chat/ToolwindowEditorActionLink.kt @@ -33,7 +33,7 @@ open class ToolwindowEditorActionLink( val startIndex = mainEditor?.document?.text?.indexOf(highlightedText) runInEdt { isEnabled = startIndex != null && startIndex != -1 - toolTipText = if (isEnabled) null else "Original state has changed" + toolTipText = if (isEnabled) null else "Original editor state has changed" } } }