fix history-substring-search