editbox: added a separate function for drawing the selection