diff --git a/main.ts b/main.ts index d0f0a1f..b8f9fd7 100644 --- a/main.ts +++ b/main.ts @@ -300,7 +300,7 @@ class TimestampModal extends Modal { insertedText = date.format('X'); else insertedText = ``; - editor.replaceRange(insertedText, cursor); + editor.replaceSelection(insertedText); editor.setCursor(cursor.line, cursor.ch + insertedText.length); modal.close(); })