aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-02-12 12:20:12 +0100
committerbfredl <bjorn.linse@gmail.com>2024-02-12 12:20:12 +0100
commitf1dd75c2af4076cfa9326f96ebd4cffd2d89a515 (patch)
tree1582cfd5baf3a626a009ad436928825f46ab3885
parent917172dd9680cc4234a47beee91e8adcaf0e833c (diff)
downloadrneovim-f1dd75c2af4076cfa9326f96ebd4cffd2d89a515.tar.gz
rneovim-f1dd75c2af4076cfa9326f96ebd4cffd2d89a515.tar.bz2
rneovim-f1dd75c2af4076cfa9326f96ebd4cffd2d89a515.zip
fix(exitfree): don't use ex commands to close windows in free_all_mem()
Attempting to manipulate the window layout via ex commands is not safe here. It is also redundant: `win_free_all()` can free multiple windows by itself perfectly fine.
-rw-r--r--src/nvim/memory.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c
index cf584575b8..d001685e63 100644
--- a/src/nvim/memory.c
+++ b/src/nvim/memory.c
@@ -724,13 +724,6 @@ void free_all_mem(void)
do_cmdline_cmd("tabonly!");
}
- if (!ONE_WINDOW) {
- // to keep things simple, don't perform this
- // ritual inside a float
- curwin = firstwin;
- do_cmdline_cmd("only!");
- }
-
// Free all spell info.
spell_free_all();