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
Ctrl-D duplicating too much text #1075
Comments
It's actually a feature that Ctrl+D duplicates whole lines when more than one is selected. Your first before/after duplicating exactly one line is also expected, because you actually only selected 1 whole line, nothing on the next. You selected If there is a bug here, it is that when a line doesn't end with a newline (like in your first unexpected example) it doesn't add such a new line and simply duplicates the range (missing the newline), leading to the lines combining as in your example. This does not happen if there's a newline character at the end of the line. |
My comment seems to have been "misplaced", it said: The keystroke is used to do two things, duplicate selection and duplicate lines, so it has to choose which one to do. The choice is to duplicate lines anytime the selection includes a line end, or there is no selection, otherwise to duplicate the selection. The documentation could be improved to spell this out. |
Previously, the documentation on the duplication did not clearly delineate the behavior of the `duplication` keystroke. Specifically, it was possible to interpret this keystroke as performing selection-only `duplication`. However, `duplication` only duplicates the selection on the same line, or the multiple lines which are selected. Accordingly, add additional statements clarifying the behavior of `duplication`. This is intended to fix [issue geany#1075](geany#1075)
If I select line 1 and just 1 character of line 2 and press Ctrl-D I get more text from line 2 duplicated than expected. In other contexts, Ctrl-D duplicates just the hilighted text. Please consider making the behavior more consistent as consistency is one of the reasons that Geany is so useful and easy to learn. Thanks!
Before
After Ctrl-D
Before
After Ctrl-D
The text was updated successfully, but these errors were encountered: