Lines Matching refs:histype
296 int histype, in add_to_history() argument
307 if ((cmdmod.cmod_flags & CMOD_KEEPPATTERNS) && histype == HIST_SEARCH) in add_to_history()
313 if (histype == HIST_SEARCH && in_map) in add_to_history()
321 --hisnum[histype]; in add_to_history()
327 if (!in_history(histype, new_entry, TRUE, sep, FALSE)) in add_to_history()
329 if (++hisidx[histype] == hislen) in add_to_history()
330 hisidx[histype] = 0; in add_to_history()
331 hisptr = &history[histype][hisidx[histype]]; in add_to_history()
340 hisptr->hisnum = ++hisnum[histype]; in add_to_history()
343 if (histype == HIST_SEARCH && in_map) in add_to_history()
355 get_history_idx(int histype) in get_history_idx() argument
357 if (hislen == 0 || histype < 0 || histype >= HIST_COUNT in get_history_idx()
358 || hisidx[histype] < 0) in get_history_idx()
361 return history[histype][hisidx[histype]].hisnum; in get_history_idx()
371 calc_hist_idx(int histype, int num) in calc_hist_idx() argument
377 if (hislen == 0 || histype < 0 || histype >= HIST_COUNT in calc_hist_idx()
378 || (i = hisidx[histype]) < 0 || num == 0) in calc_hist_idx()
381 hist = history[histype]; in calc_hist_idx()
411 get_history_entry(int histype, int idx) in get_history_entry() argument
413 idx = calc_hist_idx(histype, idx); in get_history_entry()
415 return history[histype][idx].hisstr; in get_history_entry()
425 clr_history(int histype) in clr_history() argument
430 if (hislen != 0 && histype >= 0 && histype < HIST_COUNT) in clr_history()
432 hisptr = history[histype]; in clr_history()
439 hisidx[histype] = -1; // mark history as cleared in clr_history()
440 hisnum[histype] = 0; // reset identifier counter in clr_history()
451 del_history_entry(int histype, char_u *str) in del_history_entry() argument
463 && histype >= 0 in del_history_entry()
464 && histype < HIST_COUNT in del_history_entry()
466 && (idx = hisidx[histype]) >= 0 in del_history_entry()
473 hisptr = &history[histype][i]; in del_history_entry()
486 history[histype][last] = *hisptr; in del_history_entry()
495 if (history[histype][idx].hisstr == NULL) in del_history_entry()
496 hisidx[histype] = -1; in del_history_entry()
507 del_history_idx(int histype, int idx) in del_history_idx() argument
511 i = calc_hist_idx(histype, idx); in del_history_idx()
514 idx = hisidx[histype]; in del_history_idx()
515 vim_free(history[histype][i].hisstr); in del_history_idx()
519 if (histype == HIST_SEARCH && maptick == last_maptick && i == idx) in del_history_idx()
525 history[histype][i] = history[histype][j]; in del_history_idx()
528 clear_hist_entry(&history[histype][i]); in del_history_idx()
531 hisidx[histype] = i; in del_history_idx()
541 int histype; in f_histadd() local
555 histype = str != NULL ? get_histtype(str) : -1; in f_histadd()
556 if (histype >= 0) in f_histadd()
562 add_to_history(histype, str, FALSE, NUL); in f_histadd()