Fix clint issues

This commit is contained in:
Marco Hinz
2017-01-09 20:49:47 +01:00
committed by James McCoy
parent d3f97232e8
commit b0cf071d43
5 changed files with 24 additions and 19 deletions

View File

@@ -5411,10 +5411,10 @@ void switch_buffer(bufref_T *save_curbuf, buf_T *buf)
{
block_autocmds();
set_bufref(save_curbuf, curbuf);
--curbuf->b_nwindows;
curbuf->b_nwindows--;
curbuf = buf;
curwin->w_buffer = buf;
++curbuf->b_nwindows;
curbuf->b_nwindows++;
}
/// Restore the current buffer after using switch_buffer().
@@ -5423,10 +5423,10 @@ void restore_buffer(bufref_T *save_curbuf)
unblock_autocmds();
// Check for valid buffer, just in case.
if (bufref_valid(save_curbuf)) {
--curbuf->b_nwindows;
curbuf->b_nwindows--;
curwin->w_buffer = save_curbuf->br_buf;
curbuf = save_curbuf->br_buf;
++curbuf->b_nwindows;
curbuf->b_nwindows++;
}
}