diff options
| author | Bram Moolenaar <Bram@vim.org> | 2016-07-10 19:03:57 +0200 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2016-07-10 19:03:57 +0200 |
| commit | 19ff9bf454b7492be64dd87aaf0830fa7961871e (patch) | |
| tree | c23e21ad26a14e5a3a6f93b6b52daeda08bb2bef /src/buffer.c | |
| parent | 453f37dbfd6f8304a36ea84e40a9965404206186 (diff) | |
| download | vim-git-19ff9bf454b7492be64dd87aaf0830fa7961871e.tar.gz | |
patch 7.4.2021v7.4.2021
Problem: Still too many buf_valid() calls.
Solution: Make au_new_curbuf a bufref. Use bufref_valid() in more places.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c index 3507f94ca..409564b96 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1293,7 +1293,7 @@ do_buffer( * Deleting the current buffer: Need to find another buffer to go to. * There should be another, otherwise it would have been handled * above. However, autocommands may have deleted all buffers. - * First use au_new_curbuf, if it is valid. + * First use au_new_curbuf.br_buf, if it is valid. * Then prefer the buffer we most recently visited. * Else try to find one that is loaded, after the current buffer, * then before the current buffer. @@ -1302,8 +1302,8 @@ do_buffer( buf = NULL; /* selected buffer */ bp = NULL; /* used when no loaded buffer found */ #ifdef FEAT_AUTOCMD - if (au_new_curbuf != NULL && buf_valid(au_new_curbuf)) - buf = au_new_curbuf; + if (au_new_curbuf.br_buf != NULL && bufref_valid(&au_new_curbuf)) + buf = au_new_curbuf.br_buf; # ifdef FEAT_JUMPLIST else # endif |
