# HG changeset patch # User Richard M. Stallman # Date 765531578 0 # Node ID 16ab1420558893e4e64113f014c2b63250c1ad45 # Parent 9805eca29f391c9e11b618c23e7496d6d5f52d4a (verify_charstarts): Handle truncation of lines. diff -r 9805eca29f39 -r 16ab14205588 src/dispnew.c --- a/src/dispnew.c Tue Apr 05 06:10:01 1994 +0000 +++ b/src/dispnew.c Tue Apr 05 07:39:38 1994 +0000 @@ -935,6 +935,10 @@ } } +/* Check the charstarts values in the area of window W + for internal consistency. We cannot check that they are "right"; + we can only look for something nonsensical. */ + verify_charstarts (w) struct window *w; { @@ -945,17 +949,32 @@ int left = XFASTINT (w->left); int right = left + window_internal_width (w); int next_line; + int truncate = (XINT (w->hscroll) + || (truncate_partial_width_windows + && (XFASTINT (w->width) < FRAME_WIDTH (f))) + || !NILP (XBUFFER (w->buffer)->truncate_lines)); for (i = top; i < bottom; i++) { int j; int last; - int *charstart - = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[i]; + int *charstart = FRAME_CURRENT_GLYPHS (f)->charstarts[i]; if (i != top) - if (charstart[left] != next_line) - abort (); + { + if (truncate) + { + /* If we are truncating lines, allow a jump + in charstarts from one line to the next. */ + if (charstart[left] < next_line) + abort (); + } + else + { + if (charstart[left] != next_line) + abort (); + } + } for (j = left; j < right; j++) if (charstart[j] > 0)