diff src/eval.c @ 15770:77e97f159554 v8.1.0892

patch 8.1.0892: failure when closing a window when location list is in use commit https://github.com/vim/vim/commit/eeb1b9c7ed33c152e041a286d79bf3ed00d80e40 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 10 22:59:04 2019 +0100 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 #3928)
author Bram Moolenaar <Bram@vim.org>
date Sun, 10 Feb 2019 23:00:05 +0100
parents dff66c4670b1
children 5b6c3c7feba8
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -8587,7 +8587,7 @@ find_win_by_nr_or_id(typval_T *vp)
     int	nr = (int)tv_get_number_chk(vp, NULL);
 
     if (nr >= LOWEST_WIN_ID)
-	return win_id2wp(vp);
+	return win_id2wp(tv_get_number(vp));
     return find_win_by_nr(vp, NULL);
 }