>>>>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
>> then I guess selHandle could be moved to BufferView (or >> bufferview_funcs). Abdelrazak> Could work. One way of interpreting me discussion about selHandle is that we may be able to remove it and replace by ClearSelection/StartSelection flags in LyXAction. I am not sure which version I prefer. The flags have the disadvantage of not allowing some more subtle interactions. Actually, I think the flag should be renamed as SaveSelection, since things like BUFFER_SWITCH do not clear the selection. To continue the selHandle idea, with the following patch (I did not move yet to bufferview), we would avoid most of the explicit calls to haveSelection in Bo's patch. JMarc
Index: src/Cursor.cpp =================================================================== --- src/Cursor.cpp (révision 18996) +++ src/Cursor.cpp (copie de travail) @@ -588,9 +588,13 @@ bool Cursor::selHandle(bool sel) if (sel == selection()) return false; + if (sel) + theSelection().haveSelection(*this); + else + cap::saveSelection(*this); + resetAnchor(); selection() = sel; - cap::saveSelection(*this); return true; }