scrolling while having a selected text dragged
is not possible.
i.e. in MS Explorer or MS word you can move the mouse to to top or bottom text window to make it scroll while dragging a selection.
this is very useful if you want to edit something without changing the clipboard (or copy while pressing ctrl).
I orginally wanted this feature to be implemented in Notepad++ and Notepad 2 which both use Scintilla.
regards
McLoo
Logged In: YES
user_id=12579
Originator: NO
Acknowledged. It is unlikely I will work on this.
hey Neil. Is there any chance for this feature to come? I can't imagine that people won't like this, as even Ultra Edit has implemented it.
-Ben
As I said I probably won't work on it. Its just not a big issue to me. If someone else thinks its important enough they may work on it.
So, after nearly 12 years of waiting I decided to take a shot. It is an important feature to me.
With this patch it works as desired.
Last edit: McLoo 2020-02-21
The above patch saves, modifies, and restores global state which complicates with additional side-effects and can cause problems if the global state is changed by some other code, possibly by the application during a callback. There may be several notifications inside MovedCaret.
The attached patch structures the caret policy state into new types then passes a specific policy down into the code that will decide the scrolling.
Committed changes as [e98f67] and [971668].
Related
Commit: [971668]
Commit: [e98f67]
Thanks for taking the time. I'm really happy with this!
I wonder what you'll put in the Bugs Section on ScintillaToDo.html though? :)
Removed the section with [65e1f5].
Related
Commit: [65e1f5]
Just tested this feature in SciTe 4.3.1 with a larger test file.
There seems to be one case, where XYScrollPosition should not scroll:
Line 1 400 characters
Line 2 400 characters
Line 3 0 characters
Line 4 400 characters
Other editors behave the same way, but it breaks the existing scintilla behavoir.
I guess a good way, would be to take the virtual.space setting into account and don't scroll-by-drag when the caret is moved outside the unwanted zone, if either SCVS_RECTANGULARSELECTION or SCVS_NOWRAPLINESTART is set.
Also on SCVS_RECTANGULARSELECTION because, when you have the virtual space while selecting you can assume to have it also when dragging.
Last edit: McLoo 2020-03-01
I think the current implementation is OK for 4.3.1 release.
Could only perform the MovedCaret when the caret is near the window edge - maybe within lineHeight pixels. May be possible to constrain direction of scrolling - don't scroll horizontally unless near left or right edge.
Committed changes as [e98f67] and [971668].
Related
Commit: [971668]
Commit: [e98f67]