Mercurial > hg > xemacs-beta
diff src/redisplay.c @ 4418:9bcdf9a3a783
Use Dynarr_increment instead of Dynarr_add when building a line in place.
2008-02-03 Jerry James <james@xemacs.org>
* redisplay.c (generate_displayable_area): If a line has been
generated in place in the dynarray, use Dynarr_increment instead
of Dynarr_add.
* redisplay.c (regenerate_window): Ditto.
author | Jerry James <james@xemacs.org> |
---|---|
date | Mon, 04 Feb 2008 21:41:27 -0700 |
parents | 62d532188a28 |
children | e34711681f30 |
line wrap: on
line diff
--- a/src/redisplay.c Sun Feb 03 10:35:25 2008 +0100 +++ b/src/redisplay.c Mon Feb 04 21:41:27 2008 -0700 @@ -5395,8 +5395,12 @@ else dlp->clip = 0; - assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla)); - Dynarr_add (dla, *dlp); + if (pos_of_dlp < 0) + Dynarr_add (dla, *dlp); + else if (pos_of_dlp == Dynarr_length (dla)) + Dynarr_increment (dla); + else + ABORT (); /* #### This type of check needs to be done down in the generate_display_line call. */ @@ -5602,8 +5606,12 @@ if (dlp->num_chars > w->max_line_len) w->max_line_len = dlp->num_chars; - assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla)); - Dynarr_add (dla, *dlp); + if (pos_of_dlp < 0) + Dynarr_add (dla, *dlp); + else if (pos_of_dlp == Dynarr_length (dla)) + Dynarr_increment (dla); + else + ABORT (); /* #### This isn't right, but it is close enough for now. */ w->window_end_pos[type] = start_pos;