ex_checkpath(exarg_T *eap)
{
find_pattern_in_path(NULL, 0, 0, FALSE, FALSE, CHECK_PATH, 1L,
- eap->forceit ? ACTION_SHOW_ALL : ACTION_SHOW,
- (linenr_T)1, (linenr_T)MAXLNUM, eap->forceit);
+ eap->forceit ? ACTION_SHOW_ALL : ACTION_SHOW,
+ (linenr_T)1, (linenr_T)MAXLNUM, eap->forceit, FALSE);
}
#if defined(FEAT_QUICKFIX)
}
if (!eap->skip)
find_pattern_in_path(eap->arg, 0, (int)STRLEN(eap->arg),
- whole, !eap->forceit,
- *eap->cmd == 'd' ? FIND_DEFINE : FIND_ANY,
- n, action, eap->line1, eap->line2, eap->forceit);
+ whole, !eap->forceit,
+ *eap->cmd == 'd' ? FIND_DEFINE : FIND_ANY, n, action,
+ eap->line1, eap->line2, eap->forceit, FALSE);
}
#endif
leader_len = (int)ins_compl_leader_len();
}
- for (i = 0; i < count && !got_int && !compl_interrupted
- && !compl_time_slice_expired; i++)
+ for (i = 0; i < count && !got_int && !ins_compl_interrupted(); i++)
{
fp = mch_fopen((char *)files[i], "r"); // open dictionary file
if (flags != DICT_EXACT && !shortmess(SHM_COMPLETIONSCAN)
// Read dictionary file line by line.
// Check each line for a match.
- while (!got_int && !compl_interrupted && !compl_time_slice_expired
+ while (!got_int && !ins_compl_interrupted()
&& !vim_fgets(buf, LSIZE, fp))
{
ptr = buf;
int
ins_compl_interrupted(void)
{
- return compl_interrupted;
+ return compl_interrupted || compl_time_slice_expired;
}
/*
RedrawingDisabled = 0;
ins_compl_check_keys(0, TRUE);
- if (compl_autocomplete && compl_time_slice_expired)
- rettv->vval.v_number = TRUE;
- else
- rettv->vval.v_number = ins_compl_interrupted();
+ rettv->vval.v_number = ins_compl_interrupted();
RedrawingDisabled = save_RedrawingDisabled;
}
(compl_type == CTRL_X_PATH_DEFINES
&& !(compl_cont_status & CONT_SOL))
? FIND_DEFINE : FIND_ANY, 1L, ACTION_EXPAND,
- (linenr_T)1, (linenr_T)MAXLNUM, FALSE);
+ (linenr_T)1, (linenr_T)MAXLNUM, FALSE, compl_autocomplete);
}
#endif
SAFE_islower(cap->nchar) ? ACTION_SHOW : ACTION_GOTO,
cap->cmdchar == ']' ? curwin->w_cursor.lnum + 1 : (linenr_T)1,
(linenr_T)MAXLNUM,
- FALSE);
+ FALSE, FALSE);
vim_free(ptr);
curwin->w_set_curswant = TRUE;
}
void showmatch(int c);
int current_search(long count, int forward);
int linewhite(linenr_T lnum);
-void find_pattern_in_path(char_u *ptr, int dir, int len, int whole, int skip_comments, int type, long count, int action, linenr_T start_lnum, linenr_T end_lnum, int forceit);
+void find_pattern_in_path(char_u *ptr, int dir, int len, int whole, int skip_comments, int type, long count, int action, linenr_T start_lnum, linenr_T end_lnum, int forceit, int silent);
spat_T *get_spat(int idx);
int get_spat_last_idx(void);
void f_searchcount(typval_T *argvars, typval_T *rettv);
int action, // What to do when we find it
linenr_T start_lnum, // first line to start searching
linenr_T end_lnum, // last line for searching
- int forceit) // If true, always switch to the found path
+ int forceit, // If true, always switch to the found path
+ int silent) // Do not print messages when ACTION_EXPAND
{
SearchedFile *files; // Stack of included files
SearchedFile *bigger; // When we need more space
files[depth].name = curr_fname = new_fname;
files[depth].lnum = 0;
files[depth].matched = FALSE;
- if (action == ACTION_EXPAND)
+ if (action == ACTION_EXPAND
+ && !shortmess(SHM_COMPLETIONSCAN) && !silent)
{
msg_hist_off = TRUE; // reset in msg_trunc_attr()
vim_snprintf((char*)IObuff, IOSIZE,
else if (action == ACTION_SHOW)
{
show_pat_in_path(line, type, did_show, action,
- (depth == -1) ? NULL : files[depth].fp,
- (depth == -1) ? &lnum : &files[depth].lnum, 1L);
+ (depth == -1) ? NULL : files[depth].fp,
+ (depth == -1) ? &lnum : &files[depth].lnum, 1L);
did_show = TRUE;
}
else
msg(_("No included files"));
}
}
- else if (!found && action != ACTION_EXPAND)
+ else if (!found && action != ACTION_EXPAND && !silent)
{
if (got_int || ins_compl_interrupted())
emsg(_(e_interrupted));
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1625,
/**/
1624,
/**/
find_pattern_in_path(ptr, 0, len, TRUE,
Prenum == 0 ? TRUE : FALSE, type,
- Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM, FALSE);
+ Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM,
+ FALSE, FALSE);
vim_free(ptr);
curwin->w_set_curswant = TRUE;
break;