aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-09-06 20:12:15 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-09-06 20:24:29 -0400
commitcfb2828897119df1a7d59f883d151b67609b8361 (patch)
tree3be5031b3aade722e195758286d6f8a107c61a9b /src/nvim/window.c
parentdc15dcffadca790a7b274110c0b356dcc22dfb82 (diff)
downloadrneovim-cfb2828897119df1a7d59f883d151b67609b8361.tar.gz
rneovim-cfb2828897119df1a7d59f883d151b67609b8361.tar.bz2
rneovim-cfb2828897119df1a7d59f883d151b67609b8361.zip
window: refactor boolean variables in win_close()
free_buf (param) and help_window (variable) are bool.
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 04990fedae..02bf10f9a7 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -1859,20 +1859,18 @@ static bool close_last_window_tabpage(win_T *win, bool free_buf,
return true;
}
-/*
- * Close window "win". Only works for the current tab page.
- * If "free_buf" is TRUE related buffer may be unloaded.
- *
- * Called by :quit, :close, :xit, :wq and findtag().
- * Returns FAIL when the window was not closed.
- */
-int win_close(win_T *win, int free_buf)
+// Close window "win". Only works for the current tab page.
+// If "free_buf" is true related buffer may be unloaded.
+//
+// Called by :quit, :close, :xit, :wq and findtag().
+// Returns FAIL when the window was not closed.
+int win_close(win_T *win, bool free_buf)
{
win_T *wp;
int other_buffer = FALSE;
int close_curwin = FALSE;
int dir;
- int help_window = FALSE;
+ bool help_window = false;
tabpage_T *prev_curtab = curtab;
frame_T *win_frame = win->w_frame->fr_parent;
@@ -1903,7 +1901,7 @@ int win_close(win_T *win, int free_buf)
/* When closing the help window, try restoring a snapshot after closing
* the window. Otherwise clear the snapshot, it's now invalid. */
if (bt_help(win->w_buffer))
- help_window = TRUE;
+ help_window = true;
else
clear_snapshot(curtab, SNAP_HELP_IDX);