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

Don't select and/or copy line numbers #1

Open
JohnArcher opened this issue Jun 11, 2013 · 3 comments
Open

Don't select and/or copy line numbers #1

JohnArcher opened this issue Jun 11, 2013 · 3 comments

Comments

@JohnArcher
Copy link

Hi there!

Thanks for your great plugin!

Unfortunately, if I select the source code, the line numbers are also selected and copied, which is not so nice if I want to paste it into my code files. So, is it possible that only the code is selected when line numbers are shown? I've seen that behaviour in github (I think), so I hope it's just some css magic!? :-)

Thanks a lot in advance!

@cforce
Copy link

cforce commented Jun 11, 2013

Did you play round with settings and toggle?
" choose whether you want to show the line numbers and/or the toggle button."

@cdwertmann
Copy link
Owner

The whole idea behind this plugin was to:

  1. enable line numbering and
  2. add a toggle to turn it off so you can copy it to clipboard without the numbers

To select only the code when line numbers are shown, you could use tables. This is supported in Coderay, however it also requires additional CSS to format the table. See the discussion here:
http://www.redmine.org/issues/3382

Using my plugin, just use the toggle to turn off line numbers before you copy.

@JohnArcher
Copy link
Author

Thanks for your answers. Well, I see what you mean. Well, IMHO the toggle button is quite ugly and big :-) (no offence!!!!) and especially destroys the layout if you just have one liners. That's why I don't use it and in settings I enabled to show line numbers by default.

Thanks for the link. The discussion there is a bit confusing to me. Not quite sure how to enable that, but I will read again. Thanks!

EDIT: Well, right now I don't see my mentioned one liner problem here at my installation!? So, ignore that, please. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants