aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c2
-rw-r--r--src/nvim/syntax.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 6b6c3c51a4..86b8aaecba 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -17137,7 +17137,7 @@ void ex_execute(exarg_T *eap)
p = get_tv_string(&rettv);
len = (int)STRLEN(p);
ga_grow(&ga, len + 2);
- if (ga.ga_len)
+ if (!GA_EMPTY(&ga))
((char_u *)(ga.ga_data))[ga.ga_len++] = ' ';
STRCPY((char_u *)(ga.ga_data) + ga.ga_len, p);
ga.ga_len += len;
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index c1fb1d50ba..a72bd2bec6 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -892,7 +892,7 @@ static void syn_sync(win_T *wp, linenr_T start_lnum, synstate_T *last_valid)
* For "groupthere" the parsing starts at start_lnum.
*/
if (found_flags & HL_SYNC_HERE) {
- if (current_state.ga_len) {
+ if (!GA_EMPTY(&current_state)) {
cur_si = &CUR_STATE(current_state.ga_len - 1);
cur_si->si_h_startpos.lnum = found_current_lnum;
cur_si->si_h_startpos.col = found_current_col;
@@ -2595,7 +2595,7 @@ static void push_current_state(int idx)
*/
static void pop_current_state(void)
{
- if (current_state.ga_len) {
+ if (!GA_EMPTY(&current_state)) {
unref_extmatch(CUR_STATE(current_state.ga_len - 1).si_extmatch);
--current_state.ga_len;
}