[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107701: Fix bug #11068 with window d
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107701: Fix bug #11068 with window display when default face was remapped. |
Date: |
Fri, 30 Mar 2012 11:45:27 +0300 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107701
fixes bug(s): http://debbugs.gnu.org/11068
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2012-03-30 11:45:27 +0300
message:
Fix bug #11068 with window display when default face was remapped.
src/xdisp.c (append_space_for_newline): If the default face was
remapped, use the remapped face for the appended newline.
(extend_face_to_end_of_line): Use the remapped default face for
extending the face to the end of the line.
(display_line): Call extend_face_to_end_of_line when the default
face was remapped.
modified:
src/ChangeLog
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-03-29 20:06:39 +0000
+++ b/src/ChangeLog 2012-03-30 08:45:27 +0000
@@ -1,3 +1,12 @@
+2012-03-30 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (append_space_for_newline): If the default face was
+ remapped, use the remapped face for the appended newline.
+ (extend_face_to_end_of_line): Use the remapped default face for
+ extending the face to the end of the line.
+ (display_line): Call extend_face_to_end_of_line when the default
+ face was remapped. (Bug#11068)
+
2012-03-29 Eli Zaretskii <address@hidden>
* s/ms-w32.h: Discourage from defining HAVE_GETCWD.
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2012-03-24 09:29:00 +0000
+++ b/src/xdisp.c 2012-03-30 08:45:27 +0000
@@ -18172,8 +18172,10 @@
it->c = it->char_to_display = ' ';
it->len = 1;
+ /* If the default face was remapped, be sure to use the
+ remapped face for the appended newline. */
if (default_face_p)
- it->face_id = DEFAULT_FACE_ID;
+ it->face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID);
else if (it->face_before_selective_p)
it->face_id = it->saved_face_id;
face = FACE_FROM_ID (it->f, it->face_id);
@@ -18209,7 +18211,7 @@
static void
extend_face_to_end_of_line (struct it *it)
{
- struct face *face;
+ struct face *face, *default_face;
struct frame *f = it->f;
/* If line is already filled, do nothing. Non window-system frames
@@ -18223,6 +18225,9 @@
&& !it->glyph_row->continued_p))
return;
+ /* The default face, possibly remapped. */
+ default_face = FACE_FROM_ID (f, lookup_basic_face (f, DEFAULT_FACE_ID));
+
/* Face extension extends the background and box of IT->face_id
to the end of the line. If the background equals the background
of the frame, we don't have to do anything. */
@@ -18260,7 +18265,7 @@
if (it->glyph_row->used[TEXT_AREA] == 0)
{
it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph;
- it->glyph_row->glyphs[TEXT_AREA][0].face_id = it->face_id;
+ it->glyph_row->glyphs[TEXT_AREA][0].face_id = face->id;
it->glyph_row->used[TEXT_AREA] = 1;
}
#ifdef HAVE_WINDOW_SYSTEM
@@ -18296,7 +18301,7 @@
face, to avoid painting the rest of the window with
the region face, if the region ends at ZV. */
if (it->glyph_row->ends_at_zv_p)
- it->face_id = DEFAULT_FACE_ID;
+ it->face_id = default_face->id;
else
it->face_id = face->id;
append_stretch_glyph (it, make_number (0), stretch_width,
@@ -18329,7 +18334,7 @@
avoid painting the rest of the window with the region face,
if the region ends at ZV. */
if (it->glyph_row->ends_at_zv_p)
- it->face_id = DEFAULT_FACE_ID;
+ it->face_id = default_face->id;
else
it->face_id = face->id;
@@ -18993,8 +18998,13 @@
/* A row that displays right-to-left text must always have
its last face extended all the way to the end of line,
even if this row ends in ZV, because we still write to
- the screen left to right. */
- if (row->reversed_p)
+ the screen left to right. We also need to extend the
+ last face if the default face is remapped to some
+ different face, otherwise the functions that clear
+ portions of the screen will clear with the default face's
+ background color. */
+ if (row->reversed_p
+ || lookup_basic_face (it->f, DEFAULT_FACE_ID) != DEFAULT_FACE_ID)
extend_face_to_end_of_line (it);
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107701: Fix bug #11068 with window display when default face was remapped.,
Eli Zaretskii <=