It's really nitpicking If SelLength is not zero and you set SelStart you force the memo to initiate a selection update. By first setting SelLength to zero you avoid it.
It's not very important unless you have a really long text with a really long selection.
Yeah, interesting. in TKMemo (where my interests lie) there is a SelStart, SelEnd and a Sellength. Now, obviously, given any two, you calc the third. But I'd have to dig through the src to understand the significance. TKMemo understands negative selection, if you wipe with mouse right to left you get a different result than visa versa.
So, if SelStart is, say 1000 and selLength is 0, SelEnd is also 1000. If I then set SelStart to zero, I think SelEnd remains at 1000 and, of course, so is SelLength. I think......
An experiment for when i have nothing better to do ....
Davo