Yes, but you cannot tell from the commit itself.
Hm, isn't it safer to save the selection and then restore it (if there is API available)?
It's not obvious, that wxWindowUpdateLocker clears the selection, it's also not documented and might be a bug in wxWidgets.
I did not test it with other windows or with wx from trunk.
Nevertheless, if this one line is removed it works as expected !
And I don't think we need to freeze the textcontrol to fetch it's style.
Why should it be safer ?
The update-locker was originally only used when the wrap-mode is changed and that is probably correct here to avoid flickering.
I don't know if it is really needed. In this case a slection will also be cleared, but this can probably be ignored or the selection can be stored and recreated if it is really wanted.