aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorVVKot <volodymyr.kot.ua@gmail.com>2021-12-19 07:46:28 +0000
committerzeertzjq <zeertzjq@outlook.com>2022-03-13 13:17:28 +0800
commit6c26ab71ceb9f4f12c55492ba7ab33a5e61af079 (patch)
treef1d832e84322b54cc8c4ad12a170826e7ff3377f /src/nvim/window.c
parent91ac0088e1a8bdf189bf96066eb8e0d8e632ceac (diff)
downloadrneovim-6c26ab71ceb9f4f12c55492ba7ab33a5e61af079.tar.gz
rneovim-6c26ab71ceb9f4f12c55492ba7ab33a5e61af079.tar.bz2
rneovim-6c26ab71ceb9f4f12c55492ba7ab33a5e61af079.zip
vim-patch:8.1.0892: failure when closing a window when location list is in use
Problem: Failure when closing a window when location list is in use. Solution: Handle the situation gracefully. Make sure memory for 'switchbuf' is not freed at the wrong time. (Yegappan Lakshmanan, closes vim/vim#3928) https://github.com/vim/vim/commit/eeb1b9c7ed33c152e041a286d79bf3ed00d80e40
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index faf4b117f4..f80f1f1a65 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -7195,16 +7195,14 @@ void win_id2tabwin(typval_T *const argvars, typval_T *const rettv)
tv_list_append_number(list, winnr);
}
-win_T *win_id2wp(typval_T *argvars)
+win_T *win_id2wp(int id)
{
- return win_id2wp_tp(argvars, NULL);
+ return win_id2wp_tp(id, NULL);
}
// Return the window and tab pointer of window "id".
-win_T *win_id2wp_tp(typval_T *argvars, tabpage_T **tpp)
+win_T *win_id2wp_tp(int id, tabpage_T **tpp)
{
- int id = tv_get_number(&argvars[0]);
-
FOR_ALL_TAB_WINDOWS(tp, wp) {
if (wp->handle == id) {
if (tpp != NULL) {