aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spellfile.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-12-23 07:16:21 +0100
committerGitHub <noreply@github.com>2019-12-23 07:16:21 +0100
commit2ef72437fc2e20ed7eee2520d818d3039b8e52bb (patch)
tree74ce9d579586d56f8a4fe538cae4f235595c840d /src/nvim/spellfile.c
parent2e280dac7df504b0681043647c8cc02abcbcc686 (diff)
parenta16de288c3d3e033ab0cd60fec2a2d2042774685 (diff)
downloadrneovim-2ef72437fc2e20ed7eee2520d818d3039b8e52bb.tar.gz
rneovim-2ef72437fc2e20ed7eee2520d818d3039b8e52bb.tar.bz2
rneovim-2ef72437fc2e20ed7eee2520d818d3039b8e52bb.zip
Merge #11594 from janlazo/vim-8.0.1767
vim-patch:8.0.1767,8.2.0030
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r--src/nvim/spellfile.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index 4fac001bc5..8e4f405d99 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -1238,17 +1238,14 @@ static int read_sal_section(FILE *fd, slang_T *slang)
p = xmalloc(1);
p[0] = NUL;
smp->sm_lead = p;
+ smp->sm_lead_w = mb_str2wide(smp->sm_lead);
smp->sm_leadlen = 0;
smp->sm_oneof = NULL;
+ smp->sm_oneof_w = NULL;
smp->sm_rules = p;
smp->sm_to = NULL;
- if (has_mbyte) {
- smp->sm_lead_w = mb_str2wide(smp->sm_lead);
- smp->sm_leadlen = 0;
- smp->sm_oneof_w = NULL;
- smp->sm_to_w = NULL;
- }
- ++gap->ga_len;
+ smp->sm_to_w = NULL;
+ gap->ga_len++;
}
// Fill the first-index table.
@@ -1713,7 +1710,6 @@ read_tree_node (
if (c == BY_NOFLAGS && !prefixtree) {
// No flags, all regions.
idxs[idx] = 0;
- c = 0;
} else if (c != BY_INDEX) {
if (prefixtree) {
// Read the optional pflags byte, the prefix ID and the