diff --git a/source/task-list-view.tsx b/source/task-list-view.tsx
index 12c7349..adb2545 100644
--- a/source/task-list-view.tsx
+++ b/source/task-list-view.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import {Text} from 'ink';
+import {Box, Text} from 'ink';
import Link from 'ink-link';
import {type Task} from '@doist/todoist-api-typescript';
import {parseMdLink, priorityColor} from './utils.js';
@@ -70,17 +70,23 @@ function Priority({priority}: {priority: number}) {
}
export default function TaskListView({tasks, projects}: TaskListViewProps) {
+ const numWidth = String(tasks.length).length;
return (
<>
{tasks.length === 0 && No tasks}
{tasks.map((task, i) => (
-
- {i + 1}.
-
-
-
-
-
+
+
+ {String(i + 1).padStart(numWidth)}.
+
+
+
+
+
+
+
+
+
))}
>
);