Lines Matching refs:cnt
78 * Go up or down cnt (negative is up) to new position curs.
81 vupdown(int cnt, unsigned char *curs)
84 if (cnt > 0)
85 vdown(cnt, 0, 0);
86 else if (cnt < 0)
87 vup(-cnt, 0, 0);
95 * Go up cnt lines, afterwards preferring to be ind
101 vup(int cnt, int ind, bool scroll)
111 if (cnt > i) {
112 ind -= cnt - i;
115 cnt = i;
117 if (!scroll && cnt <= vcline) {
118 vshow(dot - cnt, NOLINE);
121 cnt -= vcline, dot -= vcline, vcline = 0;
125 cnt <= WTOP - ZERO && vfit(dot - cnt, cnt) <= WTOP - ZERO)
128 if (state != VISUAL || (!insert_line && !scroll_reverse) || (!scroll && (cnt > tot || vfit(dot - cnt, cnt) > tot / 3 + 1))) {
132 vcontext(dot + ind - cnt, '.');
136 vrollR(cnt);
149 vdown(int cnt, int ind, bool scroll)
159 if (cnt > i) {
160 ind -= cnt - i;
163 cnt = i;
166 if (!scroll && cnt <= i) {
167 vshow(dot + cnt, NOLINE);
170 cnt -= i, dot += i, vcline += i;
175 if (state != VISUAL || cnt - tot > 0 || vfit(dot, cnt) > tot / 3 + 1) {
177 vcontext(dot + cnt, '.');
181 if (cnt > 0)
182 vroll(cnt);
263 int cnt = addr - dot;
264 int i = vcline + cnt;
323 * than) cnt physical lines?
326 vback(tp, cnt)
327 int cnt;
332 if (cnt > 0)
336 if (d > cnt)
338 cnt -= d;
344 * How much scrolling will it take to roll cnt lines starting at tp?
347 vfit(line *tp, int cnt)
352 while (cnt > 0) {
353 cnt--;
354 getaline(tp[cnt]);
363 * Roll cnt lines onto the screen.
366 vroll(int cnt)
375 tfixnl(), fprintf(trace, "vroll(%d)\n", cnt);
385 if (vcookit(cnt))
388 for (; cnt > 0 && Peekkey != ATTN; cnt--) {
407 vrollR(int cnt)
414 tfixnl(), fprintf(trace, "vrollR(%d), dot=%d\n", cnt, lineDOT());
417 if (vcookit(cnt))
424 for (; cnt > 0 && Peekkey != ATTN; cnt--) {
449 vcookit(int cnt)
452 return (cnt > 1 && (ospeed < B1200 && !initev || cnt > lines * 2));