From 480794146fe09581d8459ea256e16e8e059b3f19 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 8 Aug 2019 21:40:29 -0400 Subject: f_spellbadword: set len=0 for non-found word `len` is used with `list_append_string` later, and should reflect the length of `word` (i.e. 0 when not setting word / breaking above). Ref: neovim/neovim#9782 (comment) --- src/nvim/eval.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index b6e292219f..cc9dfcf27b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -16764,6 +16764,7 @@ static void f_spellbadword(typval_T *argvars, typval_T *rettv, FunPtr fptr) } str += len; capcol -= len; + len = 0; } } } -- cgit