aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2022-01-12 12:46:31 -0800
committerMichael Lingelbach <m.j.lbach@gmail.com>2022-01-12 12:46:31 -0800
commit2fd8330628e007704c28043089a47ec75093bcb8 (patch)
treec9047511152c7596a85160979503378be625ac65 /src
parentd0d4fb792f2b3ac40a00b7929c8653968821e5ae (diff)
downloadrneovim-2fd8330628e007704c28043089a47ec75093bcb8.tar.gz
rneovim-2fd8330628e007704c28043089a47ec75093bcb8.tar.bz2
rneovim-2fd8330628e007704c28043089a47ec75093bcb8.zip
Address review r2
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/extmark.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c
index ab97ff114c..5624ae83dd 100644
--- a/src/nvim/api/extmark.c
+++ b/src/nvim/api/extmark.c
@@ -603,11 +603,10 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
bool strict = true;
OPTION_TO_BOOL(strict, strict, true);
- if (line < 0 ) {
+ if (line < 0) {
api_set_error(err, kErrorTypeValidation, "line value outside range");
goto error;
- }
- else if (line > buf->b_ml.ml_line_count) {
+ } else if (line > buf->b_ml.ml_line_count) {
if (strict) {
api_set_error(err, kErrorTypeValidation, "line value outside range");
goto error;
@@ -627,7 +626,7 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
} else {
col = (Integer)len;
}
- } else if (col < -1 ) {
+ } else if (col < -1) {
api_set_error(err, kErrorTypeValidation, "col value outside range");
goto error;
}