Implement preview mode for line_input

A first attempt at implementing preview mode. When a line selected in the readline, it is scrolled into view in the buffer above and the matched text (or entire line) is highlighted.