summaryrefslogtreecommitdiff
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-05 07:39:38 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-05 07:39:38 +0000
commit353897c9061a40452bc017057b1a6199e45c951f (patch)
tree8c60068c68b3cee6bbfdd9e288b847204115654d /src/dispnew.c
parentd2563c149db58b79c0c3e650356566e37e8dad2b (diff)
downloademacs-353897c9061a40452bc017057b1a6199e45c951f.tar.gz
(verify_charstarts): Handle truncation of lines.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 7f795a4dc40..dc109883b53 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -935,6 +935,10 @@ adjust_window_charstarts (w, vpos, adjust)
}
}
+/* 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 @@ verify_charstarts (w)
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)