Lines Matching refs:i

124     int		i;  in init_history()  local
157 for (i = 0; i < newlen; ++i) in init_history()
158 clear_hist_entry(&temp[i]); in init_history()
162 for (i = 0; i <= hisidx[type]; ++i) in init_history()
163 temp[i] = history[type][i]; in init_history()
164 j = i; in init_history()
165 for ( ; i <= newlen - (hislen - hisidx[type]); ++i) in init_history()
166 clear_hist_entry(&temp[i]); in init_history()
167 for ( ; j < hislen; ++i, ++j) in init_history()
168 temp[i] = history[type][j]; in init_history()
173 for (i = newlen - 1; ; --i) in init_history()
175 if (i >= 0) // copy newest entries in init_history()
176 temp[i] = history[type][j]; in init_history()
215 int i; in in_history() local
221 i = hisidx[type]; in in_history()
224 if (history[type][i].hisstr == NULL) in in_history()
229 p = history[type][i].hisstr; in in_history()
231 && !(writing && history[type][i].viminfo) in in_history()
236 last_i = i; in in_history()
239 if (--i < 0) in in_history()
240 i = hislen - 1; in in_history()
241 } while (i != hisidx[type]); in in_history()
245 str = history[type][i].hisstr; in in_history()
246 while (i != hisidx[type]) in in_history()
248 if (++i >= hislen) in in_history()
249 i = 0; in in_history()
250 history[type][last_i] = history[type][i]; in in_history()
251 last_i = i; in in_history()
253 history[type][i].hisnum = ++hisnum[type]; in in_history()
254 history[type][i].viminfo = FALSE; in in_history()
255 history[type][i].hisstr = str; in in_history()
256 history[type][i].time_set = vim_time(); in in_history()
270 int i; in get_histtype() local
277 for (i = 0; history_names[i] != NULL; ++i) in get_histtype()
278 if (STRNICMP(name, history_names[i], len) == 0) in get_histtype()
279 return i; in get_histtype()
373 int i; in calc_hist_idx() local
378 || (i = hisidx[histype]) < 0 || num == 0) in calc_hist_idx()
384 while (hist[i].hisnum > num) in calc_hist_idx()
385 if (--i < 0) in calc_hist_idx()
389 i += hislen; in calc_hist_idx()
392 if (i >= 0 && hist[i].hisnum == num && hist[i].hisstr != NULL) in calc_hist_idx()
393 return i; in calc_hist_idx()
397 i += num + 1; in calc_hist_idx()
398 if (i < 0) in calc_hist_idx()
399 i += hislen; in calc_hist_idx()
400 if (hist[i].hisstr != NULL) in calc_hist_idx()
401 return i; in calc_hist_idx()
427 int i; in clr_history() local
433 for (i = hislen; i--;) in clr_history()
456 int i; in del_history_entry() local
470 i = last = idx; in del_history_entry()
473 hisptr = &history[histype][i]; in del_history_entry()
484 if (i != last) in del_history_entry()
492 if (--i < 0) in del_history_entry()
493 i += hislen; in del_history_entry()
494 } while (i != idx); in del_history_entry()
509 int i, j; in del_history_idx() local
511 i = calc_hist_idx(histype, idx); in del_history_idx()
512 if (i < 0) 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()
522 while (i != idx) in del_history_idx()
524 j = (i + 1) % hislen; in del_history_idx()
525 history[histype][i] = history[histype][j]; in del_history_idx()
526 i = j; in del_history_idx()
528 clear_hist_entry(&history[histype][i]); in del_history_idx()
529 if (--i < 0) in del_history_idx()
530 i += hislen; in del_history_idx()
531 hisidx[histype] = i; in del_history_idx()
638 int i; in f_histnr() local
645 i = histname == NULL ? HIST_CMD - 1 : get_histtype(histname); in f_histnr()
646 if (i >= HIST_CMD && i < HIST_COUNT) in f_histnr()
647 i = get_history_idx(i); in f_histnr()
649 i = -1; in f_histnr()
650 rettv->vval.v_number = i; in f_histnr()
663 int i; in remove_key_from_history() local
665 i = hisidx[HIST_CMD]; in remove_key_from_history()
666 if (i < 0) in remove_key_from_history()
668 p = history[HIST_CMD][i].hisstr; in remove_key_from_history()
677 for (i = 0; p[i] && !VIM_ISWHITE(p[i]); ++i) in remove_key_from_history()
678 if (p[i] == '\\' && p[i + 1]) in remove_key_from_history()
679 ++i; in remove_key_from_history()
680 STRMOVE(p, p + i); in remove_key_from_history()
698 int i, j, k; in ex_history() local
714 i = *end; in ex_history()
726 *end = i; in ex_history()
733 *end = i; in ex_history()
757 for (i = idx + 1; !got_int; ++i) in ex_history()
759 if (i == hislen) in ex_history()
760 i = 0; in ex_history()
761 if (hist[i].hisstr != NULL in ex_history()
762 && hist[i].hisnum >= j && hist[i].hisnum <= k) in ex_history()
765 sprintf((char *)IObuff, "%c%6d ", i == idx ? '>' : ' ', in ex_history()
766 hist[i].hisnum); in ex_history()
767 if (vim_strsize(hist[i].hisstr) > (int)Columns - 10) in ex_history()
768 trunc_string(hist[i].hisstr, IObuff + STRLEN(IObuff), in ex_history()
771 STRCAT(IObuff, hist[i].hisstr); in ex_history()
775 if (i == idx) in ex_history()