diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-01-28 12:49:29 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-01-28 19:10:41 +0100 |
commit | bfe84adb5a097488fa723f9917253bd6f0fbf662 (patch) | |
tree | db3d4a0030518377bd529a77437aa2718d312409 /src | |
parent | e956ea767241268861f0a8f7556700516849b112 (diff) | |
download | rneovim-bfe84adb5a097488fa723f9917253bd6f0fbf662.tar.gz rneovim-bfe84adb5a097488fa723f9917253bd6f0fbf662.tar.bz2 rneovim-bfe84adb5a097488fa723f9917253bd6f0fbf662.zip |
options: winhighlight: fix incorrect string equality test
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/option.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index cecfd7146c..37c0928d86 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3842,7 +3842,8 @@ static bool parse_winhl_opt(win_T *wp) w_hl_id_normal = hl_id; } else { for (hlf = 0; hlf < (int)HLF_COUNT; hlf++) { - if (strncmp(hlf_names[hlf], p, nlen) == 0) { + if (strlen(hlf_names[hlf]) == nlen + && strncmp(hlf_names[hlf], p, nlen) == 0) { w_hl_ids[hlf] = hl_id; break; } |