mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
+3
-1
@@ -1617,7 +1617,7 @@ static char_u *qf_last_bufname = NULL;
|
||||
static bufref_T qf_last_bufref = {NULL, 0};
|
||||
|
||||
/*
|
||||
* Get buffer number for file "directory.fname".
|
||||
* Get buffer number for file "directory/fname".
|
||||
* Also sets the b_has_qf_entry flag.
|
||||
*/
|
||||
static int
|
||||
@@ -2711,7 +2711,9 @@ qf_free(qf_info_T *qi, int idx)
|
||||
qi->qf_lists[idx].qf_index = 0;
|
||||
|
||||
qf_clean_dir_stack(&qi->qf_dir_stack);
|
||||
qi->qf_directory = NULL;
|
||||
qf_clean_dir_stack(&qi->qf_file_stack);
|
||||
qi->qf_currfile = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1669,3 +1669,25 @@ func Test_caddexpr_wrong()
|
||||
call assert_fails('caddexpr ""', 'E376:')
|
||||
let &efm = save_efm
|
||||
endfunc
|
||||
|
||||
func Test_dirstack_cleanup()
|
||||
" This used to cause a memory access in freed memory.
|
||||
let save_efm = &efm
|
||||
lexpr '0'
|
||||
lopen
|
||||
fun X(c)
|
||||
let save_efm=&efm
|
||||
set efm=%D%f
|
||||
if a:c == 'c'
|
||||
caddexpr '::'
|
||||
else
|
||||
laddexpr ':0:0'
|
||||
endif
|
||||
let &efm=save_efm
|
||||
endfun
|
||||
call X('c')
|
||||
call X('l')
|
||||
call setqflist([], 'r')
|
||||
caddbuffer
|
||||
let &efm = save_efm
|
||||
endfunc
|
||||
|
||||
@@ -92,3 +92,12 @@ func Test_win_getid()
|
||||
|
||||
only!
|
||||
endfunc
|
||||
|
||||
func Test_win_getid_curtab()
|
||||
tabedit X
|
||||
tabfirst
|
||||
copen
|
||||
only
|
||||
call assert_equal(win_getid(1), win_getid(1, 1))
|
||||
tabclose!
|
||||
endfunc
|
||||
|
||||
@@ -779,6 +779,10 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
84,
|
||||
/**/
|
||||
83,
|
||||
/**/
|
||||
82,
|
||||
/**/
|
||||
|
||||
+4
-1
@@ -7146,7 +7146,10 @@ win_getid(typval_T *argvars)
|
||||
break;
|
||||
if (tp == NULL)
|
||||
return -1;
|
||||
wp = tp->tp_firstwin;
|
||||
if (tp == curtab)
|
||||
wp = firstwin;
|
||||
else
|
||||
wp = tp->tp_firstwin;
|
||||
}
|
||||
for ( ; wp != NULL; wp = wp->w_next)
|
||||
if (--winnr == 0)
|
||||
|
||||
Reference in New Issue
Block a user