-
Notifications
You must be signed in to change notification settings - Fork 1
Description
This needs some support at the database level - essentially, when the user selects multiple items, they should be able to cut, copy, and paste, as they would in something like an IDE.
Multi-line copies need to read every single selected book (which may be every single book), and multi-line cuts / pastes need to read and modify every single selected book.
Copies should create a newline separated string, containing all selected substrings.
Pastes should, starting from the first book, take each line from the string and paste into sequential books (or if there are no newlines, paste directly).
Cuts should should also create a newline separated string, as with copies, but should also apply their edits to each string.
This is possible using CursoredText::selected, (for copy and cut), CursoredText::push (for paste), and CursoredText::del (for cut), though it will also be necessary to add distinct methods to the AppDatabase trait for each of these three operations, so that it can iterate over all of the selected books and modify them accordingly.