Stefan Schimanski wrote:
As far as I think to understand, boundary is set on line limits. If you
have a line like
"foo "
"bar"
the boundary flag is set if you are behind the space in the first line.
In the beginning of the first the boundary flag is false, but you use
the same position. That's why it needed.
As long as you have the space, the space could be used itself to make
the difference on which side you are. But there are inset like foot
notes or display math where this is not possible. E.g.:
abc\[x\]def
Then there are logically two positions between abc and \[x\]. You can be
behind the abc or in front of the math.
Now the question is how the behavior of the cursor should be. I think
the space is in fact a very special case, maybe together with explicit
newlines or line seperator. All those should be skipped, while in the
case like the display math above the two positions should really exist
logically. Does that make sense?
Stefan
Yes, I think your explanation of the concept is correct. Andre' gave a
few other examples, such as between italics and normal text. If you're
exactly on the boundary, should the next typed character be italic or
normal? And of course there's a similar situation between RTL and LTR...
What I don't understand is how the code of cursorRight and cursorLeft
relates to the concept. I don't see how the boundary gets set in the
first place: the conditions determining that we go into the code which
sets the boundary seem to be unrelated --- or even opposite --- to what
I would think they should be!
In cursorLeft, for example: what is the condition "cur.lastpos() !=
cur.pos()" for?
And "cur.textRow().pos() == cur.pos()" (what does it even mean?)?
And why the isNewLine and isLineSeparator?
That's what I don't at all understand...