fix return handling when cursor is at the beginning of the input prompt

Signed-off-by: Moritz Ulrich <ulrich.moritz@googlemail.com>