Basic auto complete support and cursor pos fixes for history.