Closed pintassilgo closed 2 weeks ago
With "caret_after_end":false . Right, will fix.
Fixed, will be in the next update/beta.
As I see in code, it was made so on purpose: e.g. to allow WIDE column blocks when mouse is pressed after the line-end of short line. yes, it places incorrect carets, but they are fixed after first caret move. after my new fix, mouse pressing after line-end makes caret pos at line-end, and makes block from THAT pos, so it is not very handy now to select blocks if we start it at short line.
if you are ok with that, ok.
So are you saying the new version limits block reach to max column of the line you clicked to start the selection, not allowing to catch wider lines? This is bad.
Why not simply adjust cursor up to each line-end as other editors such as Sublime and VSCode do?
Sublime:
VSCode:
So are you saying the new version limits block reach to max column of the line you clicked to start the selection, not allowing to catch wider lines?
yes.
Why not simply adjust cursor up to each line-end as other editors such as Sublime and VSCode do?
From my POV, this picture of ST / VS shows not column selection, ie column is not right. not sure I want to change code to make it like ST....
The result of selection in ST and VS is exactly the same as Cuda release i.e. selects everything within the 'rect area' you draw while holding the mouse. The difference is aesthetics, because it makes no sense to display cursor in a invalid position, so ST and VS correct the cursor in each line to line-end. Imo this is clearly correct and that's what I'm requesting Cuda to be the same.
Current result after you fix is bad.
By the way, I still stand with the suggestion I made previously to display the rect frame when you're performing column selection. I'm talking about that useless frame you removed from show_mouse_sel_frame
, it would be better used here.
to display the rect frame when you're performing column selection. I'm talking about that useless frame you removed from show_mouse_sel_frame, it would be better used here.
Ok, added. Other suggestion: agreed too.
New beta, better?
Looks perfect to me, thanks!
make sure it works ok for Alt+[mouse drag] too (I cannot test it w/o changing Linux settings).
That's how I tested. I don't even have that button in statusbar to change selection behavior, I use Alt when I want col selection.
When doing col selection, if you release click way at the right of the content, cursor will be displayed there, but it shouldn't, it should be limited to after the last existing char in each line.
Cuda:![image](https://github.com/Alexey-T/CudaText/assets/5483864/d18d3c95-1506-435f-811e-a5102e1d685f)
Sublime:![image](https://github.com/Alexey-T/CudaText/assets/5483864/beeed6b3-b77d-42dc-b03a-a858dfbb80ac)
VSCode:![image](https://github.com/Alexey-T/CudaText/assets/5483864/23a35285-a9a1-4120-9d0e-14fb3600bb23)