From 93d1a069f8cbaff0d5626778ea53a9d575eba70a Mon Sep 17 00:00:00 2001 From: Mecaneer23 <74385377+Mecaneer23@users.noreply.github.com> Date: Tue, 18 Jun 2024 19:29:37 -0500 Subject: [PATCH] refactor: autoformat and resolve addch/addstr discrepancy --- src/get_todo.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/get_todo.py b/src/get_todo.py index e700850..4dd0a96 100644 --- a/src/get_todo.py +++ b/src/get_todo.py @@ -344,9 +344,11 @@ def get_todo( _set_once(mode, chars, position, todo.get_color()), ) for i, char in enumerate("".join(chars).ljust(win.getmaxyx()[1] - 2)): - # why does acurses break if the following line uses addch rather than addstr? - win.addstr( - 1, i + 1, char, curses.A_STANDOUT if i == position else curses.A_NORMAL + win.addstr( # Don't use addch; output should not be buffered + 1, + i + 1, + char, + curses.A_STANDOUT if i == position else curses.A_NORMAL, ) win.refresh() try: