Skip to content

Commit

Permalink
feature: long text overflows onto additional line
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Dec 10, 2023
1 parent e1df7a6 commit e3ecd84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/class_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def is_off(self) -> bool:
def is_not_none(self) -> bool:
return self.mode != SingleLineMode.NONE

def is_once(self) -> bool:
return self.mode == SingleLineMode.ONLY_ONCE

def set_on(self) -> None:
self.mode = SingleLineMode.ON

Expand Down
4 changes: 4 additions & 0 deletions todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,10 @@ def main(stdscr: Any) -> int:
if single_line_state.is_off():
todos = handle_new_todo_next(stdscr, todos, selected, single_line_state)
continue
if single_line_state.is_once():
todos = handle_new_todo_next(stdscr, todos, selected, single_line_state)
single_line_state.set_on()
continue
next_step = get_main_input(
stdscr,
todos,
Expand Down

0 comments on commit e3ecd84

Please sign in to comment.