Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ const moveDoneToBottom = async function (editor: vscode.TextEditor, params: { mi
let doneEntries: [number, number][] = [];
headers.forEach((header, n) => {
const startLine = header.map?.[0];
if (!startLine) {
if (startLine === undefined || startLine === null) {
return;
}
let endLine;
Expand Down
6 changes: 3 additions & 3 deletions src/test/fixtures/sortable-sorted.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# TODO foo and bar
this is some stufff
# TODO whee
and yeah
## DONE
I should be left under whee!
# nothing at all
to see here
# TODO and here -- last non-done-line should be here, line 14
# TODO and here -- last non-done-line should be here, line 7
# DONE foo and bar
this is some stufff
# DONE nice (2,3)
and stuff
# DONE foo (6,6)
Expand Down
4 changes: 2 additions & 2 deletions src/test/fixtures/sortable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO foo and bar
# DONE foo and bar
this is some stufff
# DONE nice (2,3)
and stuff
Expand All @@ -12,5 +12,5 @@ and whatever yeah
# nothing at all
to see here
# DONE bar (9, 9)
# TODO and here -- last non-done-line should be here, line 14
# TODO and here -- last non-done-line should be here, line 7
# DONE baz (11, 12)
Loading