From 18afbefd93206b3bfcf8f8187e298a0ba5869a54 Mon Sep 17 00:00:00 2001 From: mecaneer23 Date: Mon, 11 Sep 2023 11:53:32 -0500 Subject: [PATCH] only print info message if win is provided --- src/print_todos.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/print_todos.py b/src/print_todos.py index a52ee01..50fcbb6 100644 --- a/src/print_todos.py +++ b/src/print_todos.py @@ -91,9 +91,9 @@ def print_todos(win: Any, todos: list[Todo], selected: Cursor) -> None: width, height = get_terminal_size() else: height, width = win.getmaxyx() - if len(todos) < 1: - info_message(win, height, width) - return + if len(todos) < 1: + info_message(win, height, width) + return new_todos, temp_selected = make_printable_sublist(height - 1, todos, int(selected)) highlight = range(temp_selected, len(selected) + temp_selected) for relative, (i, todo) in zip(