refactor: remove success notification upon insert at caret action

This commit is contained in:
Carl-Robert Linnupuu 2024-09-05 12:27:09 +03:00
parent c417ccadac
commit a81bfa1005
2 changed files with 3 additions and 8 deletions

View file

@ -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;
});
}