diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-11 18:24:00 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-11 18:57:54 -0400 |
commit | 3d77ca39c70446ed63a54ee286688c394826511c (patch) | |
tree | d66c2d554be7d99f6e3c81afc3655fd61b646af7 /src/nvim/buffer.c | |
parent | 594536a1e71c90fd558501a675c459b8c7c242ea (diff) | |
download | rneovim-3d77ca39c70446ed63a54ee286688c394826511c.tar.gz rneovim-3d77ca39c70446ed63a54ee286688c394826511c.tar.bz2 rneovim-3d77ca39c70446ed63a54ee286688c394826511c.zip |
lint
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index d4e21d26f6..3fadcc75bf 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -505,9 +505,10 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) int nwindows = buf->b_nwindows; - /* decrease the link count from windows (unless not in any window) */ - if (buf->b_nwindows > 0) - --buf->b_nwindows; + // decrease the link count from windows (unless not in any window) + if (buf->b_nwindows > 0) { + buf->b_nwindows--; + } if (diffopt_hiddenoff() && !unload_buf && buf->b_nwindows == 0) { diff_buf_delete(buf); // Clear 'diff' for hidden buffer. @@ -515,8 +516,9 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) /* Return when a window is displaying the buffer or when it's not * unloaded. */ - if (buf->b_nwindows > 0 || !unload_buf) + if (buf->b_nwindows > 0 || !unload_buf) { return; + } if (buf->terminal) { terminal_close(buf->terminal, NULL); |