Skip to content

Commit

Permalink
refactor: autoformat and resolve addch/addstr discrepancy
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Jun 19, 2024
1 parent 3dcc33e commit 93d1a06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/get_todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 93d1a06

Please sign in to comment.