comparison src/indent.c @ 361:7347b34c275b r21-1-10

Import from CVS: tag r21-1-10
author cvs
date Mon, 13 Aug 2007 10:58:40 +0200
parents 7c94d56991e1
children cc15677e0335
comparison
equal deleted inserted replaced
360:0f00b38cfccb 361:7347b34c275b
571 : vtarget)); 571 : vtarget));
572 572
573 /* #### This assertion must be true before the if statements are hit 573 /* #### This assertion must be true before the if statements are hit
574 but may possibly be wrong after the call to 574 but may possibly be wrong after the call to
575 point_in_line_start_cache if orig is outside of the visible 575 point_in_line_start_cache if orig is outside of the visible
576 region of the buffer. Handle this. */ 576 region of the buffer. Handle this.
577 assert (elt >= 0); 577
578 This occurs sometimes if scroll-step is non-zero and the window
579 is very small. In this case it's not possible to lay out any lines
580 in the window and point_in_line_start_cache returns -1 because
581 the line cache is empty. In this case we will just return the
582 original point and hope for the best. */
583 if (elt < 0)
584 return orig;
578 585
579 /* Moving downward. */ 586 /* Moving downward. */
580 if (vtarget > 0) 587 if (vtarget > 0)
581 { 588 {
582 int cur_line = Dynarr_length (w->line_start_cache) - 1 - elt; 589 int cur_line = Dynarr_length (w->line_start_cache) - 1 - elt;