Skip to content

Commit

Permalink
fix: Cursor does not reset when file is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
1943time committed Jan 6, 2024
1 parent 86ab44a commit 64a9379
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderer/src/store/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ export class TreeStore {
}
}
node.parent!.children = node.parent!.children!.filter(c => c !== node)
if (!this.openedNote || this.openedNote.ext !== '.md') {
this.currentTab.store.editor.selection = null
}
}
}

Expand Down

0 comments on commit 64a9379

Please sign in to comment.