From 04d9e562737a96042c7a0631f3482ddbe19c2b6c Mon Sep 17 00:00:00 2001 From: mecaneer23 Date: Mon, 11 Dec 2023 17:56:13 -0600 Subject: [PATCH] fix: textbox cutting off text of a certain length --- todo.py | 2 +- todo.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/todo.py b/todo.py index 3db2b8b..b9c27dc 100755 --- a/todo.py +++ b/todo.py @@ -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( diff --git a/todo.txt b/todo.txt index a950f1e..cf8e6fd 100644 --- a/todo.txt +++ b/todo.txt @@ -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