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/netbeans.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/netbeans.c')
-rw-r--r-- | src/netbeans.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/netbeans.c b/src/netbeans.c index e326af8f3..736bb16b0 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -2177,10 +2177,15 @@ nb_do_cmd( #endif ) { +#ifdef FEAT_AUTOCMD + bufref_T bufref; + + set_bufref(&bufref, buf->bufp); +#endif buf_write_all(buf->bufp, FALSE); #ifdef FEAT_AUTOCMD /* an autocommand may have deleted the buffer */ - if (!buf_valid(buf->bufp)) + if (!bufref_valid(&bufref)) buf->bufp = NULL; #endif } |