Skip to content

Commit

Permalink
feat: allow searching using ctrl+f
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Jun 20, 2024
1 parent e736555 commit 4655b69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Key:

nodelay_escape = -1
ctrl_a = 1
ctrl_f = 6
backspace = 8
tab = 9
enter = 10
Expand Down
1 change: 1 addition & 0 deletions todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ def main(stdscr: curses.window) -> int:
# make sure it also calls update_file()
keys: dict[int, tuple[Callable[..., Todos | None], str]] = {
Key.ctrl_a: (selected.multiselect_all, "len(todos)"),
Key.ctrl_f: (search_menu, "stdscr, todos, selected"),
Key.backspace: (join_lines, "todos, selected"),
Key.backspace_: (join_lines, "todos, selected"),
Key.backspace__: (join_lines, "todos, selected"),
Expand Down

0 comments on commit 4655b69

Please sign in to comment.