aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-06-16 11:55:40 +0200
committerGitHub <noreply@github.com>2018-06-16 11:55:40 +0200
commit4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d (patch)
tree22e59e2f57c824369bd8d5f0d561f42303886229 /src/nvim/syntax.c
parentc990d65c37ded9ad9f4002a6eb6ec36aa29b4fe3 (diff)
parentf419f914fc52fc86216b59e8ffa6fd510f79c6cd (diff)
downloadrneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.tar.gz
rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.tar.bz2
rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.zip
Merge #8526 from janlazo/vim-8.0.0451
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 68f0422f7d..b8cbf3b2a8 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -2824,11 +2824,12 @@ syn_add_end_off (
base = ml_get_buf(syn_buf, result->lnum, FALSE);
p = base + col;
if (off > 0) {
- while (off-- > 0 && *p != NUL)
- mb_ptr_adv(p);
+ while (off-- > 0 && *p != NUL) {
+ MB_PTR_ADV(p);
+ }
} else {
while (off++ < 0 && base < p) {
- mb_ptr_back(base, p);
+ MB_PTR_BACK(base, p);
}
}
col = (int)(p - base);
@@ -2873,11 +2874,11 @@ syn_add_start_off (
p = base + col;
if (off > 0) {
while (off-- && *p != NUL) {
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
} else {
while (off++ && base < p) {
- mb_ptr_back(base, p);
+ MB_PTR_BACK(base, p);
}
}
col = (int)(p - base);