We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c4d0ac commit b363564Copy full SHA for b363564
src/main.ts
@@ -182,8 +182,8 @@ export default class TimeTreePlugin extends Plugin {
182
183
async insertNewTask(editor: Editor): Promise<void> {
184
let cursor = editor.getCursor();
185
- if (cursor.ch !== 0) {
186
- const currentLineText = editor.getLine(cursor.line);
+ const currentLineText = editor.getLine(cursor.line);
+ if (currentLineText.trim() !== "" || cursor.ch !== 0) {
187
editor.replaceRange("\n", {
188
line: cursor.line,
189
ch: currentLineText.length,
0 commit comments