LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading.
https://luteorg.github.io/lute-manual/
MIT License
493 stars 46 forks source link

Copy-to-clipboard doesn't work across multiple lines #427

Closed bwkimmel closed 4 weeks ago

bwkimmel commented 6 months ago

Description

I cannot copy multiple lines of text to the clipboard.

To Reproduce

Steps to reproduce the behavior, e.g.:

  1. Import a book.
  2. Highlight multiple lines of text from the clipboard. Note that the UI does allow you to highlight multiple lines.
  3. Press CTRL+C to copy the text.
  4. Open another application (e.g., a text editor), and paste the contents into that application. Only one of the lines highlighted in step (2) will appear.

Screenshots

Highlighted text (step 2):

image

Copied text (step 3-4): 평일에는 동네에 있는 체육관에서 Expected: two lines of text should have been copied.

Extra software info, if not already included in the Description:

jzohrab commented 6 months ago

Thanks @bwkimmel . I mentioned this in #428 - Lute thinks each separate line is a standalone sentence, which is why the copy seems busted. I'll have to see if there's a good solution for this, it gets tricky!

Until a decent solution is written, my hack workaround for you would be to edit the imported files so that each sentence is on the same line.

jzohrab commented 2 months ago

Looking at this again, thought it would be quick. The manual at https://luteorg.github.io/lute-manual/usage/keyboard-bindings.html says:

c   Copy the sentence of the current word to the clipboard
Shift + c   Copy the paragraph of the current word to the clipboard

There's no "control-C" shortcut.

so it's a bit different than what this issue requests. But as mentioned, the UI does allow highlighting across lines, so it would feel logical (to me) for the copy to copy everything that was highlighted ... maybe a new "control-C" shortcut would be the clearest thing to do.

jzohrab commented 1 month ago

Hi again. I'm implementing "copy full page" as part of #495 , which should mostly suffice.

I forgot about an undocumented feature: if you hold down shift while mouse-down-dragging across multiple sentences:

image

when you release the mouse, Lute says "Copied to clipboard!" and then you can paste it:

unknown" - according to Lute, this is the first time you're seeing these words.
You can click on a word, and create a definition. For example, click on this word: elephant.
When the form pops up in the right-hand frame, a dictionary

(the paste above differs b/c I did two different click and drags to make the picture vs the paste)

jzohrab commented 4 weeks ago

I added a page to the manual about copying text, I thought it was needed. Thanks for the nudge. :wave:

https://luteorg.github.io/lute-manual/usage/reading/copying-text.html