aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-01-28 22:23:35 +0100
committerGitHub <noreply@github.com>2020-01-28 22:23:35 +0100
commit01ff9db633fccc7099d71cfe48b8d77a2f638326 (patch)
treedb3d4a0030518377bd529a77437aa2718d312409 /src
parente956ea767241268861f0a8f7556700516849b112 (diff)
parentbfe84adb5a097488fa723f9917253bd6f0fbf662 (diff)
downloadrneovim-01ff9db633fccc7099d71cfe48b8d77a2f638326.tar.gz
rneovim-01ff9db633fccc7099d71cfe48b8d77a2f638326.tar.bz2
rneovim-01ff9db633fccc7099d71cfe48b8d77a2f638326.zip
Merge pull request #11780 from bfredl/winhlparse
options: winhighlight: fix incorrect string equality test
Diffstat (limited to 'src')
-rw-r--r--src/nvim/option.c3
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;
}