From 2be853d486be2cac3b04efbf425afac2dd9361a3 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 5 Sep 2018 23:04:54 -0400 Subject: lint --- src/nvim/window.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/nvim/window.c') diff --git a/src/nvim/window.c b/src/nvim/window.c index 02bf10f9a7..6f382acd84 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1900,10 +1900,11 @@ int win_close(win_T *win, bool 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)) + if (bt_help(win->w_buffer)) { help_window = true; - else + } else { clear_snapshot(curtab, SNAP_HELP_IDX); + } if (win == curwin) { /* @@ -1967,8 +1968,9 @@ int win_close(win_T *win, bool free_buf) || close_last_window_tabpage(win, free_buf, prev_curtab))) { // Autocommands have closed all windows, quit now. Restore // curwin->w_buffer, otherwise writing ShaDa file may fail. - if (curwin->w_buffer == NULL) + if (curwin->w_buffer == NULL) { curwin->w_buffer = curbuf; + } getout(0); } // Autocommands may have moved to another tab page. -- cgit