diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-02 23:43:43 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-03 18:58:29 -0500 |
commit | f85386d170892bceecb6923f68f8861a84a77b9d (patch) | |
tree | 6180c8297debcea188b59f4c7c2905e78bff4da9 /src/nvim/spell.c | |
parent | 6bc1844b112197ab2701edd80d44f7ac77f2e466 (diff) | |
download | rneovim-f85386d170892bceecb6923f68f8861a84a77b9d.tar.gz rneovim-f85386d170892bceecb6923f68f8861a84a77b9d.tar.bz2 rneovim-f85386d170892bceecb6923f68f8861a84a77b9d.zip |
vim-patch:8.2.1907: complete_info().selected may be wrong
Problem: Complete_info().selected may be wrong.
Solution: Update cp_number if it was never set. (issue vim/vim#6945)
https://github.com/vim/vim/commit/f9d51354de069dddc049b9e109b1932c92e5aee6
Misc changes:
For variables and function parameters that use "Direction" enum values,
update their type from from "int" to "Direction".
It is hard to review function parameters that must accept
"Direction" enum values only.
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 797fe41320..5714f5e425 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -79,7 +79,6 @@ /* for offsetof() */ #include <stddef.h> -#include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/spell.h" #include "nvim/buffer.h" @@ -6653,7 +6652,7 @@ void spell_dump_compl ( char_u *pat, // leading part of the word int ic, // ignore case - int *dir, // direction for adding matches + Direction *dir, // direction for adding matches int dumpflags_arg // DUMPFLAG_* ) { @@ -6820,7 +6819,9 @@ spell_dump_compl ( // Dumps one word: apply case modifications and append a line to the buffer. // When "lnum" is zero add insert mode completion. -static void dump_word(slang_T *slang, char_u *word, char_u *pat, int *dir, int dumpflags, int wordflags, linenr_T lnum) +static void dump_word(slang_T *slang, char_u *word, char_u *pat, + Direction *dir, int dumpflags, int wordflags, + linenr_T lnum) { bool keepcap = false; char_u *p; @@ -6906,7 +6907,7 @@ dump_prefixes ( slang_T *slang, char_u *word, // case-folded word char_u *pat, - int *dir, + Direction *dir, int dumpflags, int flags, // flags with prefix ID linenr_T startlnum |