Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> Jean-Marc Lasgouttes wrote:
selHandle is not the same as clearing selection on a cursor. It is
a tool used in Text3.cpp for lfuns that may begin a selection or
terminate one (does that ring a bell?).

Abdelrazak> Yes but I am afraid of consecutive call from different
Abdelrazak> Cursors in different LFUNs. The Cursor passed in an LFUN
Abdelrazak> is often a temporary Cursor created before the dispatch
Abdelrazak> and that does not contain the real selection. So when you
Abdelrazak> do:

Abdelrazak> + if (!sel) + cap::saveSelection(*this);

Abdelrazak> This will not work because the selected text is not
Abdelrazak> correct (it is empty IIRC at new Cursor location). But, if
Abdelrazak> you do this:

What new cursor location.

I assume this is a question so the answer is: for mouse related LFUNs, the cursor is set to the new location before we dispatch the LFUN.

selHandle is called with cursors that do
have the selection (in Text3 and in mathed).

selection() remains true yes but...

AFAIK, it is used for all
the cursor-moving operations that might kill the selection.

Are you sure that selBegin() and selEnd() is preserved all along the dispatch machinery?


Moving the cursor with the mouse is a different story that needs to be
handled indeed.

Yes, the selection is not correctly preserved in this case.


And also the deletion-related lfuns need to be handled, but I suspect
this can be done in a centralized place (cap::eraseSelection?)

Dunno...

Abdel.

Reply via email to