Fixed issue with vi-mode and history-substring-search