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 #1075](https://github.com/geany/geany/issues/1075) You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1228
-- Commit Summary --
* Fix: Improve documentation on duplication
-- File Changes --
M doc/geany.txt (4)
-- Patch Links --
https://github.com/geany/geany/pull/1228.patch https://github.com/geany/geany/pull/1228.diff
@@ -3357,6 +3357,10 @@ Delete to line start Ctrl-Shift-BackSpace Deletes from the begin current caret position.
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
If the selection spans more than one line,
this duplicates the lines containing selections.
If the selection spans only a single line, then only
the selection is duplicated.
Thanks, but I'm not sure, seems to be even more confusing to me. Why talk about the selection being multiple lines? If its the selection, its the selection.
I am not sure whats confusing about the existing description, but suggest "Duplicate the selection. If no selection duplicate the current line." if further clarification is needed.
@@ -3357,6 +3357,10 @@ Delete to line start Ctrl-Shift-BackSpace Deletes from the begin current caret position.
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
If the selection spans more than one line,
this duplicates the lines containing selections.
If the selection spans only a single line, then only
the selection is duplicated.
@elextr the point here is to say that if e.g. one and a half lines are selected, they will be *both* duplicated entirely, instead of duplicating one and a half line.
@@ -3357,6 +3357,10 @@ Delete to line start Ctrl-Shift-BackSpace Deletes from the begin current caret position.
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
If the selection spans more than one line,
this duplicates the lines containing selections.
If the selection spans only a single line, then only
the selection is duplicated.
Oh, ok, "Duplicate whole lines, either all lines wholly or partly in the selection, or the current line if no selection."
@@ -3357,6 +3357,10 @@ Delete to line start Ctrl-Shift-BackSpace Deletes from the begin current caret position.
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
If the selection spans more than one line,
this duplicates the lines containing selections.
If the selection spans only a single line, then only
the selection is duplicated.
@elextr nice try, but not quite that :) If a portion of a single line is selected, it only duplicates that portion (e.g. if you select `second` in `select the second word` and duplicate, it gives you `select the secondsecond word`).
Basically this tries to "do the right thing": * if you have nothing selected, it duplicates the current line * if the selection spans a single line, it duplicates that portion * if the selection spans more than one line, it duplicates the whole block of lines on which the selection spans (e.g. extends the selection to span whole lines, and duplicates that portion)
@@ -3357,6 +3357,10 @@ Delete to line start Ctrl-Shift-BackSpace Deletes from the begin current caret position.
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
If the selection spans more than one line,
this duplicates the lines containing selections.
If the selection spans only a single line, then only
the selection is duplicated.
Dunno, sounds more confusing than the "right thing", but anyway as you can tell I don't use it :)
Then a list just like your three dot points then, simple is better :) The only thing would be that the middle point might say "if the selection is on one line only, only the selection is duplicated"
@mgruben pushed 1 commit.
940aca3 Include third duplication scenario
@@ -3357,6 +3357,12 @@ Delete to line start Ctrl-Shift-BackSpace Deletes from the begin current caret position.
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
If the selection spans more than one line,
this duplicates the lines containing selections.
If the selection spans only a single line, then
As suggested to @b4n, "spans" is not the right word when its only part of a line.
@mgruben pushed 1 commit.
c44de78 Rephrase description of duplication scenarios
I like @b4n's bullet list; commit 3 attempts to capture that phrasing while describing one-line-selection duplication while incorporating @elextr's synonym request.
@@ -3357,7 +3357,14 @@ Delete to line start Ctrl-Shift-BackSpace Deletes from the begin current caret position.
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
If nothing is selected, this duplicates the
current line.
If the selection spans more than one line, this
duplicates the whole block of lines on which the
Doesn't need the "on" in this line.
@mgruben thanks for your patience, only one minor comment, otherwise LGTM.
@mgruben pushed 1 commit.
ef061e9 Remove needless word
@elextr happy to help; I use geany every day
github-comments@lists.geany.org