From 73da9fdafddfe861bc2afdc300be1d4bc810cf7d Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 18 Oct 2016 10:48:29 -0400 Subject: 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. --- src/nvim/ex_getln.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 4254697241..7444eb8a38 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -4396,6 +4396,7 @@ static HistoryType hist_char2type(const int c) case '>': { return HIST_DEBUG; } + case NUL: case '/': case '?': { return HIST_SEARCH; -- cgit