RSyntaxTextArea icon indicating copy to clipboard operation
RSyntaxTextArea copied to clipboard

Block Selection

Open illumi opened this issue 10 years ago • 4 comments

I release there was some talk about Block Selection in the past, was there ever a conclusion about this with the move to newer Java versions?

illumi avatar Dec 11 '14 17:12 illumi

This is not yet implemented, and would be a major new feature. I'd like to do it one day but it is not going to be in the next release.

bobbylight avatar Dec 13 '14 01:12 bobbylight

Any traction on the "Block Selection" feature? (it has been open for a while)

goranschwarz avatar Aug 31 '20 08:08 goranschwarz

I have implemented a very dirty version locally, and was not easy, but i'm not a great programmer swingwise either. The way i did was to implement a mouse listener that creates multiple selection points on Alt-keydown to "fake" a column selection. Then you need to reimplement replaceSelection-method and similar with a version that honors replacement of multiple selections, and well as getSelection stuff for copy/paste operations, and there are a couple of such places. Another tricky part is column selections and tabs as well as "virtual space" stuff / jagged lines.

The part i'm not done with is to "keep" selection and caret marking after inserting a key. It's too bad java doesn't support this out of the box. Also, there is no/bad support for stuff like virtual space.

siggemannen avatar Sep 01 '20 07:09 siggemannen

I thought this was in a branch (with bugs) but it isn't. I had done some work on it but like @siggemannen's attempt there were outstanding issues and it wasn't true multi-caret like folks expect these days. I'll see if I can find my local branch with this work and push it as a starting point

bobbylight avatar Sep 01 '20 23:09 bobbylight