Changed the scintilla default in (<geany root>/scintilla/src/Editor.cxx Line 167) from SC_MULTIPASTE_ONCE to SC_MULTIPASTE_EACH - fixes the paste only one line when a vertical selection is selected. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2325
-- Commit Summary --
* Changed the scintilla default from SC_MULTIPASTE_ONCE to SC_MULTIPASTE_EACH - fixes the paste only one line when a vertical selection is selected.
-- File Changes --
M scintilla/src/Editor.cxx (2)
-- Patch Links --
https://github.com/geany/geany/pull/2325.patch https://github.com/geany/geany/pull/2325.diff
b4n requested changes on this pull request.
This is OK as an example of the behavior you want, but won't be merged like this.
We don't modify the Scintilla source itself, and Scintilla has all what is needed to change this from Geany's code. Also, we most probably won't force this one all users, so we'll want a setting somewhere (which one should be the default is more questionable though).
So as far as a review goes, please add a setting and set this option from Geany's code (somewhere in *editor.c*).
Ummm, after thinking about it some more I'm going to partly contradict @b4n [ducks] and my own rant by saying that actually I don't think this needs an option, to not paste multiple copies of the clipboard the user simply has to not have a rectangular selection as the target of the paste.
The only situation where an extra step is needed if paste once is not available (that I can think of) is if the user intended to paste in the first line of the rectangular selection and have the rest deleted, but if the delete is done first the only extra effort is a click where the paste is to be (which removes the now empty rectangular selection). So unless somebody has another use-case for paste once into rectangular selections I don't think the option is needed.
Note that if the clipboard contains a rectangular selection it seems to be only pasted once irrespective of this option.
@AdamDanischewski but @b4n's requirement to move the setting outside Scintilla code still applies. If you make changes to anything in the `scintilla` directory its likely they will be overwritten by the next Scintilla update.
@AdamDanischewski pushed 1 commit.
5a127803b5c15f100114992ddb2955484a9b748d Update Editor.cxx
Note that if the clipboard contains a rectangular selection it seems to be only pasted once irrespective of this option.
Well to be fair pasting a multi-line selection is the only use case I though of that would cause issues, so if it still behaves as it does now it's probably fine. But I didn't give it much though or experiment just yet either.
--- @elextr it's funny to see *you* supporting hard-coding a new default :)
@AdamDanischewski pushed 2 commits.
f4672f1ff64a045aaa1845edee57dfa02ce0a809 Moved scintilla SC_MULTIPASTE_EACH default setting to Geany. a33ec297e6ef648373bda4aa7f7c3304b9e4700f Merge branch 'multipaste' of https://github.com/AdamDanischewski/geany into multipaste
@AdamDanischewski pushed 1 commit.
f76cf9d4f52388f4358db897779b6ae2726e20af Update sciwrappers.h
Closed #2325.
Copy paste error.
Copy paste error.
What does that mean? PRs aren't immutable, just force push if you messed something up, or a commit to fix it and squash it later.
Well to be fair pasting a multi-line selection is the only use case I though of that would cause issues, so if it still behaves as it does now it's probably fine.
@b4n, agreed, so I tried it, and the post was to say, I tried it quickly (changing the line @AdamDanischewski did) and found multi-pasting a rectangular clipboard content works as it does now.
it's funny to see you supporting hard-coding a new default :)
@b4n As was said on one of the plethora of issues on this topic, an option is not a good UX for something like this, you are not going to copy to the clipboard, remember to go change an option, then come back and paste, thats why I was saying make two separate paste commands, paste single and paste multiple, but in the end the _pragmatic_ solution was just to click to remove the rectangular selection if you only want to paste single.
github-comments@lists.geany.org