Mercurial > hg > xemacs-beta
changeset 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 | 0cee1ff42db4 |
children | eb82fbb675ea |
files | src/ChangeLog src/redisplay.c |
diffstat | 2 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sun Feb 03 10:35:25 2008 +0100 +++ b/src/ChangeLog Mon Feb 04 21:41:27 2008 -0700 @@ -1,3 +1,10 @@ +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. + 2008-02-01 Jerry James <james@xemacs.org> * event-Xt.c (emacs_Xt_event_handler): Remove unnecessary call to
--- 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;