Update main.ts

This commit is contained in:
Matt Smallman 2023-03-26 15:37:41 +01:00 committed by GitHub
parent f7b8f3932f
commit 4351cd8d5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ export default class TasksToOmnifocus extends Plugin {
if (this.settings.markComplete) {
let completedText = editorText.replace(/- \[ \]/g, "- [x]");
editor.setValue(completedText);
editor.replaceSelection(completedText);
}
} catch (err) {