correctly handle shift+enter as extending the selection

before this change, entering shift+enter without a selection behaved the
same as enter, however, with a selection, a newline was entered in the
middle of a line

with this change, shift+enter correctly starts or extends the selection
depending if there is currently a selection or not