aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-12-21 18:09:54 +0000
committerRichard M. Stallman2002-12-21 18:09:54 +0000
commit40a301b3524036f179f3293e80304fd3f435624b (patch)
treeaac97fbcf5e73a0690b9d3ab3637432a1937ff09 /src
parent164c8bfebc21a91856e52a78e5425507d9a957b3 (diff)
downloademacs-40a301b3524036f179f3293e80304fd3f435624b.tar.gz
emacs-40a301b3524036f179f3293e80304fd3f435624b.zip
(row_containing_pos): Change exit test using last_y.
(try_window_id): Abort if row_containing_pos returns null.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index aff2421a1b7..b795a9ff998 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -861,9 +861,11 @@ static void display_tool_bar_line P_ ((struct it *));
861 Window display dimensions 861 Window display dimensions
862 ***********************************************************************/ 862 ***********************************************************************/
863 863
864/* Return the window-relative maximum y + 1 for glyph rows displaying 864/* Return the bottom boundary y-position for text lines in window W.
865 text in window W. This is the height of W minus the height of a 865 This is the first y position at which a line cannot start.
866 mode line, if any. */ 866 It is relative to the top of the window.
867
868 This is the height of W minus the height of a mode line, if any. */
867 869
868INLINE int 870INLINE int
869window_text_bottom_y (w) 871window_text_bottom_y (w)
@@ -11514,7 +11516,10 @@ row_containing_pos (w, charpos, start, end, dy)
11514 /* Give up if we have gone too far. */ 11516 /* Give up if we have gone too far. */
11515 if (end && row >= end) 11517 if (end && row >= end)
11516 return NULL; 11518 return NULL;
11517 if (MATRIX_ROW_BOTTOM_Y (row) >= last_y) 11519 /* This formerly returned if they were equal.
11520 I think that both quantities are of a "last plus one" type;
11521 if so, when they are equal, the row is within the screen. -- rms. */
11522 if (MATRIX_ROW_BOTTOM_Y (row) > last_y)
11518 return NULL; 11523 return NULL;
11519 11524
11520 /* If it is in this row, return this row. */ 11525 /* If it is in this row, return this row. */
@@ -11734,6 +11739,8 @@ try_window_id (w)
11734 row = row_containing_pos (w, PT, r0, NULL, 0); 11739 row = row_containing_pos (w, PT, r0, NULL, 0);
11735 if (row) 11740 if (row)
11736 set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); 11741 set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
11742 else
11743 abort ();
11737 return 1; 11744 return 1;
11738 } 11745 }
11739 } 11746 }
@@ -11773,6 +11780,8 @@ try_window_id (w)
11773 row = row_containing_pos (w, PT, r0, NULL, 0); 11780 row = row_containing_pos (w, PT, r0, NULL, 0);
11774 if (row) 11781 if (row)
11775 set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); 11782 set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
11783 else
11784 abort ();
11776 return 2; 11785 return 2;
11777 } 11786 }
11778 } 11787 }