Add support for bar item
Add current input to text to complete from

This let's you type a word not seen in the buffer and then later on
complete it in the same message.

Extract duplicated logic into get_left_of_cursor()