Skip to content

Commit

Permalink
feat: support pasting multiline todos
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Apr 14, 2024
1 parent caba770 commit 6762d4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def _todo_from_clipboard(
todos.insert(selected + 1, Todo(repr(copied_todo)))
return todos
if "\n" in todo:
alert(stdscr, "Pasting newlines not supported")
todo = todo.strip()
for index, line in enumerate(todo.split("\n"), start=1):
todos.insert(selected + index, Todo(f"- {line}"))
return todos
todos.insert(selected + 1, Todo(f"- {todo}"))
return todos
Expand Down
1 change: 0 additions & 1 deletion todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
-r fix long lines (longer than width // 2 - 1)
-r fix moving down onto a toggled line
-b feat: implement multiline todos
-b allow multiline paste
-b allow multiline print
-m fix: make startup faster
-m depends on how the program is run, not a huge issue
Expand Down

0 comments on commit 6762d4e

Please sign in to comment.