Vincent van Ravesteijn - TNW wrote:
For the moment, forget this cur.setSelection() part. It is still not
correct probably. Although I don't encounter the problem anymore, it
might not be correct to call it in cur.setSelection(...). Maybe it
breaks down something else.
cs 26146 did solve a same problem, but then the selection is removed
when the mouse is released. Iin this case however, the mouse isn't
released yet, so the empty selections still exist. Maybe we should add
it to line 1234 in Text3.cpp ?
I am not sure I understand. I'll let JMarc handle this part.
Consider it work in progress..
Still some comments:
is_beg_pit and is_end_pit: please rename those to something more
meaningful related to the selection state. IIUC, maybe 'is_sel_begin'
and 'is_sel_end'?
+ char_type const bb[] = { row.sel_beg == 0 && is_beg_pit ? 1 : 0 +
+ row.sel_end == par_->size() && is_end_pit ? 2 : 0 +
+ row.sel_end == row.endpos() && sel_end_pos == row.endpos() ? 4
: 0 };
This is too convoluted, please split this expression into more
intelligible smaller booleans.
Abdel.