diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-10 22:11:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-10 22:11:16 +0200 |
commit | 7c0a2f367f2507669560b1a66423155c70d2e75b (patch) | |
tree | 7cd0523311a25f653497197abc1fa86ed62bcc79 /src/term.c | |
parent | ea3f2e7be447a8f0c4436869620f908de5e8ef1e (diff) | |
download | vim-git-7c0a2f367f2507669560b1a66423155c70d2e75b.tar.gz |
patch 7.4.2024v7.4.2024
Problem: More buf_valid() calls can be optimized.
Solution: Use bufref_valid() instead.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index 7ff5af6dc..8cb3e8a67 100644 --- a/src/term.c +++ b/src/term.c @@ -1908,21 +1908,21 @@ set_termname(char_u *term) #ifdef FEAT_AUTOCMD { - buf_T *old_curbuf; + bufref_T old_curbuf; /* * Execute the TermChanged autocommands for each buffer that is * loaded. */ - old_curbuf = curbuf; + set_bufref(&old_curbuf, curbuf); for (curbuf = firstbuf; curbuf != NULL; curbuf = curbuf->b_next) { if (curbuf->b_ml.ml_mfp != NULL) apply_autocmds(EVENT_TERMCHANGED, NULL, NULL, FALSE, curbuf); } - if (buf_valid(old_curbuf)) - curbuf = old_curbuf; + if (bufref_valid(&old_curbuf)) + curbuf = old_curbuf.br_buf; } #endif } |