hist_char2type: Return '/' for NUL.

During -S execution, ccline.cmdfirstc is NULL, so calling histadd() with
a hist-name of '' would fail.  Mimic Vim's behavior and fallback to '/'
in this scenario, since '' is a documented hist-name as of
vim/vim@3e496b0e.
This commit is contained in:
James McCoy 2016-10-18 10:48:29 -04:00
parent 6bbd4b2298
commit 73da9fdafd

View File

@ -4396,6 +4396,7 @@ static HistoryType hist_char2type(const int c)
case '>': {
return HIST_DEBUG;
}
case NUL:
case '/':
case '?': {
return HIST_SEARCH;