> One question though, the block caret mode (CARETSTYLE_BLOCK) seems to behave
> a bit funny. When selecting text in this mode, one would expect to click on
> top of a charactar to start selection from that point and not between two
> chars as in line caret mode. Unless I'm overseeing something, it's very easy
> to select the charactar next to the intended one by mistake. Any ideas on
> this?
I expect the block caret was implemented for a vi emulation mode,
and didn't change anything not needed for that.
Neil
---------
Hello,
Yes, I understand but I would be surprised if this is the way vi or vim behaves. Actually, my issue seems very much related to the word selection patch you just commited (which I haven't had the time to try yet):
"Thus the mouse click is now resolved to a character position rather than an inter-character position"
If I understand it correctly, that change only applies to double clicks. However, I think the same behaviour would be expected for a single click + drag when marking text. This would be independent of the caret style.
In addition, in caret blockstyle mode even a single mouse click without drag should always be resolved to a character position. That's at least how I would expect it.
Best,
Nicholai
> "Thus the mouse click is now resolved to a character position rather than an
> inter-character position"
>
> If I understand it correctly, that change only applies to double clicks.
> However, I think the same behaviour would be expected for a single click +
> drag when marking text. This would be independent of the caret style.
Ever since Smalltalk, GUI editors have resolved mouse clicks to
inter-character positions rather than character positions.
See Byte August 1981, section "Making a Selection":
http://carlstrom.com/stanford/cs242/readings/11.pdf
Neil
Ever since Smalltalk, GUI editors have resolved mouse clicks to
inter-character positions rather than character positions.
See Byte August 1981, section "Making a Selection":
http://carlstrom.com/stanford/cs242/readings/11.pdf
------------
Seems you're right but at least from that description it seems that Smalltalk would show a line caret in the intercharacter gap for the "draw-through" operation. I don't know if it did use a block caret at all.
Personally, I don't see the logic of selecting the charactar next to the one the user clicks on in block caret mode. The editors I'm used to don't do that (and they are indeed not older than 1981 ;-) but maybe that differs between editors.