mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
+1
-1
@@ -784,7 +784,7 @@ RealWaitForChar(
|
||||
return 0;
|
||||
} else if (msec < 0) {
|
||||
/* no time-out; wait on indefinitely */
|
||||
continue;
|
||||
return 1; /* fakeout to force a wait in vms_read() */
|
||||
} else {
|
||||
/* time-out needs to be checked */
|
||||
status = sys$gettim(&time_curr);
|
||||
|
||||
+1
-5
@@ -5897,7 +5897,6 @@ ex_helpgrep(exarg_T *eap)
|
||||
char_u *lang;
|
||||
#endif
|
||||
qf_info_T *qi = &ql_info;
|
||||
qf_info_T *save_qi;
|
||||
int new_qi = FALSE;
|
||||
win_T *wp;
|
||||
char_u *au_name = NULL;
|
||||
@@ -5951,9 +5950,6 @@ ex_helpgrep(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
/* Autocommands may change the list. Save it for later comparison */
|
||||
save_qi = qi;
|
||||
|
||||
regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING);
|
||||
regmatch.rm_ic = FALSE;
|
||||
if (regmatch.regprog != NULL)
|
||||
@@ -6086,7 +6082,7 @@ ex_helpgrep(exarg_T *eap)
|
||||
{
|
||||
apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
|
||||
curbuf->b_fname, TRUE, curbuf);
|
||||
if (!new_qi && qi != save_qi && qf_find_buf(qi) == NULL)
|
||||
if (!new_qi && qi != &ql_info && qf_find_buf(qi) == NULL)
|
||||
/* autocommands made "qi" invalid */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3175,3 +3175,17 @@ func Test_vimgrep_autocmd()
|
||||
call delete('Xtest2.txt')
|
||||
call setqflist([], 'f')
|
||||
endfunc
|
||||
|
||||
" The following test used to crash Vim
|
||||
func Test_lhelpgrep_autocmd()
|
||||
lhelpgrep quickfix
|
||||
autocmd QuickFixCmdPost * call setloclist(0, [], 'f')
|
||||
lhelpgrep buffer
|
||||
call assert_equal('help', &filetype)
|
||||
call assert_equal(0, getloclist(0, {'nr' : '$'}).nr)
|
||||
lhelpgrep tabpage
|
||||
call assert_equal('help', &filetype)
|
||||
call assert_equal(1, getloclist(0, {'nr' : '$'}).nr)
|
||||
au! QuickFixCmdPost
|
||||
new | only
|
||||
endfunc
|
||||
|
||||
@@ -776,6 +776,10 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1750,
|
||||
/**/
|
||||
1749,
|
||||
/**/
|
||||
1748,
|
||||
/**/
|
||||
|
||||
@@ -2156,8 +2156,9 @@ typedef enum {
|
||||
# define number_width(x) 7
|
||||
#endif
|
||||
|
||||
/* This must come after including proto.h */
|
||||
#if !(defined(FEAT_MBYTE) && defined(WIN3264))
|
||||
/* This must come after including proto.h.
|
||||
* For VMS this is defined in macros.h. */
|
||||
#if !(defined(FEAT_MBYTE) && defined(WIN3264)) && !defined(VMS)
|
||||
# define mch_open(n, m, p) open((n), (m), (p))
|
||||
# define mch_fopen(n, p) fopen((n), (p))
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user