aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-24 18:31:07 +0800
committerGitHub <noreply@github.com>2023-01-24 18:31:07 +0800
commitc6ab8dfc15e0f6f1a805ce2145e2b4f0072b33d1 (patch)
tree0e39f9d3c235f63aa7ee57dc7f4ce237b7d3c9f7 /src/nvim/ex_getln.c
parent39630265c476e64b2a544155e52b7a133222a551 (diff)
downloadrneovim-c6ab8dfc15e0f6f1a805ce2145e2b4f0072b33d1.tar.gz
rneovim-c6ab8dfc15e0f6f1a805ce2145e2b4f0072b33d1.tar.bz2
rneovim-c6ab8dfc15e0f6f1a805ce2145e2b4f0072b33d1.zip
revert: "refactor(win_close): remove "force", don't pass on "free_buf" (#21921)" (#21979)
This reverts commit 0371d0f7afa5e01dd2ac8bbd3abcf0f7454872b3. > 'bufhidden' option exists. I don't think we should assume autoclosing windows are fine just because 'hidden' is set.
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index de671872dd..c62142310d 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -4355,7 +4355,7 @@ static int open_cmdwin(void)
// Create empty command-line buffer.
if (buf_open_scratch(0, _("[Command Line]")) == FAIL) {
// Some autocommand messed it up?
- win_close(curwin, true);
+ win_close(curwin, true, false);
ga_clear(&winsizes);
cmdwin_type = 0;
return Ctrl_C;
@@ -4520,7 +4520,7 @@ static int open_cmdwin(void)
// win_goto() may trigger an autocommand that already closes the
// cmdline window.
if (win_valid(wp) && wp != curwin) {
- win_close(wp, true);
+ win_close(wp, true, false);
}
// win_close() may have already wiped the buffer when 'bh' is