Email or username:

Password:

Forgot your password?
Devine Lu Linvega

Each time I implement form logic, I learn a few new tricks, I've always been a bit scared of handling negative length selection(when selection-to, is before the selection-from). Turns out there's not much to it beyond making helper functions that returns the range and flips thing when they're negative.

4 comments
dwardoric

@neauoire Nice! What do you think about selecting everything between two parantheses by double clicking on one of them?

Devine Lu Linvega

@dwardoric double-clicking on a thin character like parens is tricky, but I did add mouse2 to select a word tho, that's something I use a lot.

I don't use a mouse, so I tend to stay away from double-click type behaviors.

dwardoric

@neauoire Awesome! Second mouse button makes way more sense. Maybe clicking mouse2 inside parantheses?
I was just reminded of that parantheses thing (from plan9 I think) when I saw the video. :-)

Devine Lu Linvega

Went ahead and implemented both-ways selection in Left after learning to do it with Note Pad.

Go Up