aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorGrzegorz Milka <grzegorzmilka@gmail.com>2016-10-23 00:56:15 +0200
committerGrzegorz Milka <grzegorzmilka@gmail.com>2016-10-23 01:17:39 +0200
commitd357a42389752b5270cf590b2f078f836de6c736 (patch)
tree4d7385d3171a7c63e2ab152a4e781fe49e29fe62 /src/nvim/ex_cmds.c
parent9755a2ffd5727c7fc0576e60a21368618978c504 (diff)
downloadrneovim-d357a42389752b5270cf590b2f078f836de6c736.tar.gz
rneovim-d357a42389752b5270cf590b2f078f836de6c736.tar.bz2
rneovim-d357a42389752b5270cf590b2f078f836de6c736.zip
Fix lint errors.
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 79ee69bb56..f19a9206a4 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -2250,23 +2250,25 @@ do_ecmd (
xfree(new_name);
goto theend;
}
- if (buf == curbuf) /* already in new buffer */
- auto_buf = TRUE;
- else {
- win_T *the_curwin = curwin;
+ if (buf == curbuf) { // already in new buffer
+ auto_buf = true;
+ } else {
+ win_T *the_curwin = curwin;
// Set the w_closing flag to avoid that autocommands close the window.
- the_curwin->w_closing = TRUE;
- if (curbuf == old_curbuf)
+ the_curwin->w_closing = true;
+ if (curbuf == old_curbuf) {
buf_copy_options(buf, BCO_ENTER);
+ }
// Close the link to the current buffer. This will set
// curwin->w_buffer to NULL.
- u_sync(FALSE);
+ u_sync(false);
close_buffer(oldwin, curbuf,
- (flags & ECMD_HIDE) || curbuf->terminal ? 0 : DOBUF_UNLOAD, FALSE);
+ (flags & ECMD_HIDE) || curbuf->terminal ? 0 : DOBUF_UNLOAD,
+ false);
- the_curwin->w_closing = FALSE;
+ the_curwin->w_closing = false;
// autocmds may abort script processing
if (aborting() && curwin->w_buffer != NULL) {