Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop erasing the copy buffer if copying empty editor selections
Resolves #1843 Previously it has been the case that if you attempt to copy something in the note editor but there is no selection then it will wipe out the system's copy buffer. This is because we implement our own copy handler which strips away the visual formatting of elements in the note editor. 1. Copy anything in any app, suppose you copy "test" 2. Paste that "test" anywhere, it pastes 3. Click in the note editor but don't select anything. 4. "Copy" by hitting the copy shortcut or by using a menu option 5. Paste anywhere Although we'd expect that "test" is still in our copy buffer we get the empty string pasted in and "test" is gone. While not really _wrong_ or _broken_ this is a bit jarring and it's probably better in most cases to preserve the previous copy buffer if we're not copying anything. We've turned the copy command into a "clear the copy buffer" command if there's no content. In this patch we're aborting the copy if our selection is empty and that will preserve the existing buffer and the expected behavior.
- Loading branch information