Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bwkimmel opened this issue May 20, 2024 · 4 comments
Closed

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

bwkimmel opened this issue May 20, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@bwkimmel
Copy link
Contributor

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:

  • OS (e.g., iOS, windows): Windows 11 Pro
  • Browser (e.g., chrome, safari): Brave 1.66.110
  • How you've installed Lute (Docker, python, source): Python
  • Version: 3.3.2
@jzohrab
Copy link
Collaborator

jzohrab commented May 28, 2024

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 jzohrab added this to Lute-v3 May 28, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Sep 13, 2024

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
Copy link
Collaborator

jzohrab commented Oct 20, 2024

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
Copy link
Collaborator

jzohrab commented Oct 29, 2024

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

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

@jzohrab jzohrab closed this as completed Oct 29, 2024
@github-project-automation github-project-automation bot moved this to Done in Lute-v3 Oct 29, 2024
@jzohrab jzohrab added the documentation Improvements or additions to documentation label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

2 participants