Show first part of inputbox if history items it too long.

If a too long history items was displayed we put also the cursor to the end of
the value. But this causes that the first, and potentially more interesting
part was hidden. Now we place the cursor to the beginning, if the printed
content in inputbox is too long.