Skip to content

Commit

Permalink
fix: textbox cutting off text of a certain length
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Dec 11, 2023
1 parent 96932d3 commit 04d9e56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def edit_todo(stdscr: Any, todos: list[Todo], selected: int) -> list[Todo]:
max_y, max_x = stdscr.getmaxyx()
todo = todos[selected].display_text
ncols = (
max(max_x * 3 // 4, len(todo) + 3) if len(todo) < max_x - 1 else max_x * 3 // 4
max(max_x * 3 // 4, len(todo) + 3) + 1 if len(todo) < max_x - 1 else max_x * 3 // 4 + 1
)
begin_x = max_x // 8 if len(todo) < max_x - 1 - ncols else (max_x - ncols) // 2
edited_todo = wgetnstr(
Expand Down
1 change: 1 addition & 0 deletions todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-1 fix long lines (longer than width // 2 - 1)
-1 fix moving down onto a toggled line
-2 fix lines longer than textbox during editing
-2 fix really long lines (longer than textbox width * 2)
-3 make it work on windows
-3 appears to be a compatibility problem with python3.12
-4 implement multiline todos
Expand Down

0 comments on commit 04d9e56

Please sign in to comment.