aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2004-02-25 12:54:16 +0000
committerMiles Bader2004-02-25 12:54:16 +0000
commit7d8a0b55514f748e61bd918625b5a99ed7d6f199 (patch)
tree63f6db9001ce461fb3d69bf04ef96d949b17be4f /src
parentb9db45677aa477f9728e0071b1aea21d93e2e52c (diff)
downloademacs-7d8a0b55514f748e61bd918625b5a99ed7d6f199.tar.gz
emacs-7d8a0b55514f748e61bd918625b5a99ed7d6f199.zip
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-114
Merge some minor redisplay bug-fixes from emacs--tiling--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--tiling--0--patch-9 Remove bogus xassert * miles@gnu.org--gnu-2004/emacs--tiling--0--patch-10 Avoid negative descents for images with ascent > height * miles@gnu.org--gnu-2004/emacs--tiling--0--patch-13 Fix iterator-inconsistency bug in redisplay
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog14
-rw-r--r--src/xdisp.c17
-rw-r--r--src/xfns.c3
3 files changed, 29 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index de4e053a82a..ae838e34693 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,17 @@
12004-02-25 Miles Bader <miles@gnu.org>
2
3 * xdisp.c (check_it): Check string/string_pos consistency.
4 (init_iterator): Initialize string-related fields properly.
5
62004-02-11 Miles Bader <miles@gnu.org>
7
8 * xdisp.c (produce_image_glyph): Force negative descents to zero.
9
102004-02-10 Miles Bader <miles@gnu.org>
11
12 * xfns.c (lookup_image): Remove xassert(!interrupt_input_blocked);
13 BLOCK_INPUT can be nested, so it doesn't make much sense.
14
12004-02-24 Michael Mauger <mmaug@yahoo.com> 152004-02-24 Michael Mauger <mmaug@yahoo.com>
2 16
3 * w32fns.c (slurp_file, xbm_scan, xbm_load_image) 17 * w32fns.c (slurp_file, xbm_scan, xbm_load_image)
diff --git a/src/xdisp.c b/src/xdisp.c
index f068290078f..e7b3ec20268 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1904,10 +1904,14 @@ check_it (it)
1904 xassert (STRINGP (it->string)); 1904 xassert (STRINGP (it->string));
1905 xassert (IT_STRING_CHARPOS (*it) >= 0); 1905 xassert (IT_STRING_CHARPOS (*it) >= 0);
1906 } 1906 }
1907 else if (it->method == next_element_from_buffer) 1907 else
1908 { 1908 {
1909 /* Check that character and byte positions agree. */ 1909 xassert (IT_STRING_CHARPOS (*it) < 0);
1910 xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); 1910 if (it->method == next_element_from_buffer)
1911 {
1912 /* Check that character and byte positions agree. */
1913 xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it)));
1914 }
1911 } 1915 }
1912 1916
1913 if (it->dpvec) 1917 if (it->dpvec)
@@ -2020,6 +2024,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
2020 it->current.overlay_string_index = -1; 2024 it->current.overlay_string_index = -1;
2021 it->current.dpvec_index = -1; 2025 it->current.dpvec_index = -1;
2022 it->base_face_id = base_face_id; 2026 it->base_face_id = base_face_id;
2027 it->string = Qnil;
2028 IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = -1;
2023 2029
2024 /* The window in which we iterate over current_buffer: */ 2030 /* The window in which we iterate over current_buffer: */
2025 XSETWINDOW (it->window, w); 2031 XSETWINDOW (it->window, w);
@@ -17685,6 +17691,11 @@ produce_image_glyph (it)
17685 it->descent = it->phys_descent = img->height + 2 * img->vmargin - it->ascent; 17691 it->descent = it->phys_descent = img->height + 2 * img->vmargin - it->ascent;
17686 it->pixel_width = img->width + 2 * img->hmargin; 17692 it->pixel_width = img->width + 2 * img->hmargin;
17687 17693
17694 /* It's quite possible for images to have an ascent greater than
17695 their height, so don't get confused in that case. */
17696 if (it->descent < 0)
17697 it->descent = 0;
17698
17688 /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */ 17699 /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */
17689 face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f); 17700 face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f);
17690 if (face_ascent > it->ascent) 17701 if (face_ascent > it->ascent)
diff --git a/src/xfns.c b/src/xfns.c
index cecffb1c222..f5e3c0c62e5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1,5 +1,5 @@
1/* Functions for the X window system. 1/* Functions for the X window system.
2 Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 01, 02, 03 2 Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04
3 Free Software Foundation. 3 Free Software Foundation.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -5315,7 +5315,6 @@ lookup_image (f, spec)
5315 } 5315 }
5316 5316
5317 UNBLOCK_INPUT; 5317 UNBLOCK_INPUT;
5318 xassert (!interrupt_input_blocked);
5319 } 5318 }
5320 5319
5321 /* We're using IMG, so set its timestamp to `now'. */ 5320 /* We're using IMG, so set its timestamp to `now'. */