diff options
author | James McCoy <jamessan@jamessan.com> | 2016-10-18 10:48:29 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-10-18 10:48:29 -0400 |
commit | 73da9fdafddfe861bc2afdc300be1d4bc810cf7d (patch) | |
tree | e775e315017bd5efaf35676bcf0c05f71dfa7920 | |
parent | 6bbd4b22982b05ee0f6d63e9faa842ea3b6b7c49 (diff) | |
download | rneovim-73da9fdafddfe861bc2afdc300be1d4bc810cf7d.tar.gz rneovim-73da9fdafddfe861bc2afdc300be1d4bc810cf7d.tar.bz2 rneovim-73da9fdafddfe861bc2afdc300be1d4bc810cf7d.zip |
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.
-rw-r--r-- | src/nvim/ex_getln.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |