fix wrong behaviour of SelectWholeText()