From d7b5c14f32d878cf6f1d499cc8dab3bef99c649b Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sat, 14 Feb 2026 22:20:54 -0500 Subject: [PATCH] indent tasks when wrapping --- source/task-list-view.tsx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) 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)}. + + + + + + + + + ))} ); -- 2.51.2