comparison src/dispnew.c @ 352:cd7ffb1fcb45

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Thu, 25 Jul 1991 13:21:16 +0000
parents 36a905212ceb
children 1eb88445014d
comparison
equal deleted inserted replaced
351:5729b1cc3942 352:cd7ffb1fcb45
532 *--endt = *--endf; 532 *--endt = *--endf;
533 while (endf != from); 533 while (endf != from);
534 } 534 }
535 else 535 else
536 { 536 {
537 /* Since the overlap is always less than SIZE, we can always 537 /* Since TO - FROM >= 64, the overlap is less than SIZE,
538 safely do this loop once. */ 538 so we can always safely do this loop once. */
539 while (endt > to) 539 while (endt > to)
540 { 540 {
541 endt -= (to - from); 541 endt -= (to - from);
542 endf -= (to - from); 542 endf -= (to - from);
543 543
582 582
583 bcopy (from, to, size); 583 bcopy (from, to, size);
584 } 584 }
585 #endif 585 #endif
586 586
587 /* Rotate a vector of SIZE bytes, by DISTANCE bytes. 587 /* Rotate a vector of SIZE bytes right, by DISTANCE bytes.
588 DISTANCE may be negative. */ 588 DISTANCE may be negative. */
589 589
590 static void 590 static void
591 rotate_vector (vector, size, distance) 591 rotate_vector (vector, size, distance)
592 char *vector; 592 char *vector;
1246 So what we do is start on the target line, and scan upwards 1246 So what we do is start on the target line, and scan upwards
1247 until we find a screen line that starts right after a newline 1247 until we find a screen line that starts right after a newline
1248 in the buffer, or at the top of the window; both of these 1248 in the buffer, or at the top of the window; both of these
1249 assure us that the character at bufp starts flush with the 1249 assure us that the character at bufp starts flush with the
1250 beginning of the line. */ 1250 beginning of the line. */
1251 int i; 1251 int start_line;
1252
1253 #if 0
1254 /* Unfortunately, the bufp array doesn't seem to be updated properly. */
1252 1255
1253 /* Only works for the leftmost window on a line. bufp is useless 1256 /* Only works for the leftmost window on a line. bufp is useless
1254 for the others. */ 1257 for the others. */
1255 if (window_left == 0) 1258 if (window_left == 0)
1256 { 1259 {
1257 for (i = line; i > XFASTINT (window->top); i--) 1260 for (start_line = line; start_line > 0; start_line--)
1258 if (FETCH_CHAR (bufp[i]-1) == '\n') 1261 if (FETCH_CHAR (bufp[XFASTINT (window->top) + start_line]-1)
1262 == '\n')
1259 break; 1263 break;
1264 posn = bufp[XFASTINT (window->top) + start_line];
1260 } 1265 }
1266 else
1267 #endif
1268 {
1269 start_line = 0;
1270 posn = Fmarker_position (window->start);
1271 }
1261 1272
1262 posn 1273 posn
1263 = compute_motion (bufp[i], i, window_left, 1274 = compute_motion (posn, start_line, window_left,
1264 ZV, col, line, 1275 ZV, line, col - window_left,
1265 window_width, XINT (window->hscroll), 0) 1276 window_width, XINT (window->hscroll), 0)
1266 ->bufpos; 1277 ->bufpos;
1267 } 1278 }
1268 1279
1269 current_buffer = old_current_buffer; 1280 current_buffer = old_current_buffer;