diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2019-03-16 15:34:16 +0100 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2019-03-16 15:34:16 +0100 |
commit | 073ab7cda83ca2f804b02e10bc6be17a02c4d3c9 (patch) | |
tree | 06738c34484ec1134bdbb7135b6e6739d3970cb0 /src/nvim/window.c | |
parent | 86992a7bb1fbf7f4eb2632a473ae3dbe5221d50f (diff) | |
download | rneovim-073ab7cda83ca2f804b02e10bc6be17a02c4d3c9.tar.gz rneovim-073ab7cda83ca2f804b02e10bc6be17a02c4d3c9.tar.bz2 rneovim-073ab7cda83ca2f804b02e10bc6be17a02c4d3c9.zip |
api: refactor FloatRelative usage
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 7acf2a7f7e..609d8f1b4f 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -685,11 +685,11 @@ static bool parse_float_relative(String relative, FloatRelative *out) *out = (FloatRelative)0; } char *str = relative.data; - if (!STRICMP(str, "editor")) { + if (striequal(str, "editor")) { *out = kFloatRelativeEditor; - } else if (!STRICMP(str, "win")) { + } else if (striequal(str, "win")) { *out = kFloatRelativeWindow; - } else if (!STRICMP(str, "cursor")) { + } else if (striequal(str, "cursor")) { *out = kFloatRelativeCursor; } else { return false; @@ -804,7 +804,8 @@ bool parse_float_config(Dictionary config, FloatConfig *fconfig, bool reconf, } } - if (has_window && !(has_relative && fconfig->relative == kFloatRelativeWindow)) { + if (has_window && !(has_relative + && fconfig->relative == kFloatRelativeWindow)) { api_set_error(err, kErrorTypeValidation, "'win' key is only valid with relative='win'"); return false; |