aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index bcc7a92b33..fb7878c2f4 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2350,9 +2350,9 @@ void entering_window(win_T *const win)
}
}
-/// Closes all windows for buffer `buf` until there is only one non-floating window.
+/// Closes all windows for buffer `buf` unless there is only one non-floating window.
///
-/// @param keep_curwin don't close `curwin`, but caller must ensure `curwin` is non-floating.
+/// @param keep_curwin don't close `curwin`
void close_windows(buf_T *buf, bool keep_curwin)
{
tabpage_T *tp, *nexttp;
@@ -2360,8 +2360,6 @@ void close_windows(buf_T *buf, bool keep_curwin)
++RedrawingDisabled;
- assert(!keep_curwin || !curwin->w_floating);
-
// Start from lastwin to close floating windows with the same buffer first.
// When the autocommand window is involved win_close() may need to print an error message.
for (win_T *wp = lastwin; wp != NULL && (lastwin == aucmd_win || !one_window(wp));) {