Skip to content

Multiline copy/cut/paste #14

@philippeitis

Description

@philippeitis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions