Mercurial > vim
comparison src/syntax.c @ 11127:506f5d8b7d8b v8.0.0451
patch 8.0.0451: some macros are in lower case
commit https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 12 19:22:36 2017 +0100
patch 8.0.0451: some macros are in lower case
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case. Avoid lower case macros use an
argument twice.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 12 Mar 2017 19:30:05 +0100 |
parents | d8a550329a97 |
children | f4ea50924c6d |
comparison
equal
deleted
inserted
replaced
11126:48599a3eae0b | 11127:506f5d8b7d8b |
---|---|
3209 base = ml_get_buf(syn_buf, result->lnum, FALSE); | 3209 base = ml_get_buf(syn_buf, result->lnum, FALSE); |
3210 p = base + col; | 3210 p = base + col; |
3211 if (off > 0) | 3211 if (off > 0) |
3212 { | 3212 { |
3213 while (off-- > 0 && *p != NUL) | 3213 while (off-- > 0 && *p != NUL) |
3214 mb_ptr_adv(p); | 3214 MB_PTR_ADV(p); |
3215 } | 3215 } |
3216 else if (off < 0) | 3216 else if (off < 0) |
3217 { | 3217 { |
3218 while (off++ < 0 && base < p) | 3218 while (off++ < 0 && base < p) |
3219 mb_ptr_back(base, p); | 3219 MB_PTR_BACK(base, p); |
3220 } | 3220 } |
3221 col = (int)(p - base); | 3221 col = (int)(p - base); |
3222 } | 3222 } |
3223 result->col = col; | 3223 result->col = col; |
3224 } | 3224 } |
3263 base = ml_get_buf(syn_buf, result->lnum, FALSE); | 3263 base = ml_get_buf(syn_buf, result->lnum, FALSE); |
3264 p = base + col; | 3264 p = base + col; |
3265 if (off > 0) | 3265 if (off > 0) |
3266 { | 3266 { |
3267 while (off-- && *p != NUL) | 3267 while (off-- && *p != NUL) |
3268 mb_ptr_adv(p); | 3268 MB_PTR_ADV(p); |
3269 } | 3269 } |
3270 else if (off < 0) | 3270 else if (off < 0) |
3271 { | 3271 { |
3272 while (off++ && base < p) | 3272 while (off++ && base < p) |
3273 mb_ptr_back(base, p); | 3273 MB_PTR_BACK(base, p); |
3274 } | 3274 } |
3275 col = (int)(p - base); | 3275 col = (int)(p - base); |
3276 } | 3276 } |
3277 result->col = col; | 3277 result->col = col; |
3278 } | 3278 } |