Jean-Marc Lasgouttes schreef op 30-4-2014 15:55:
30/04/2014 15:40, Vincent van Ravesteijn:
The attached patch runs the DEPM when a selection is cleared. If this is
not done, there may be empty paragraphs and double whitespaces left behind.
How do we know that we are not suppressing spaces or paragraphs without the
calling code noticing it? I see potential for crashes.
JMarc
The general procedure for handling LFUNs that move the cursor is to:
- move the cursor with Text::setCursor (this calls the DEPM)
- set or unset the selection status with Cursor::selHandle (this now also
calls the DEPM).
So, in general the calling code is robust to suppressing space or
paragraphs as they almost always also move the cursor (which triggers the
depm as well).
I'm asking to see if someone knows what I'm overlooking.
Vincent