summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2012-09-11 12:32:41 +0900
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2012-09-11 12:32:41 +0900
commit3057e615af94af8d08f475208c7e459f5d7115ac (patch)
tree1e784dddfa2fdd42e420cd4ff469d66b4f7f8368
parentc990426a9883c1bd1782e6b117184b654eecda67 (diff)
Fix wrong overhang display for gstring compositions (Bug#12364).
* xdisp.c (right_overwritten, right_overwriting): Also handle gstring composition cases (Bug#12364). * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left overhang of succeeding glyphs overlapping box cursor. * w32term.c (x_draw_glyph_string): Likewise.
-rw-r--r--src/ChangeLog10
-rw-r--r--src/w32term.c1
-rw-r--r--src/xdisp.c6
-rw-r--r--src/xterm.c1
4 files changed, 16 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0e5bbfd2524..362d0b775b0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
+ composition cases (Bug#12364).
+
+ * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
+ overhang of succeeding glyphs overlapping box cursor.
+
+ * w32term.c (x_draw_glyph_string): Likewise.
+
2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
Simplify, document, and port floating-point (Bug#12381).
diff --git a/src/w32term.c b/src/w32term.c
index 571db3cbe8e..28c1c593cf6 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2591,6 +2591,7 @@ x_draw_glyph_string (struct glyph_string *s)
w32_set_clip_rectangle (next->hdc, NULL);
next->hl = save;
next->num_clips = 0;
+ next->clip_head = s->next;
}
}
}
diff --git a/src/xdisp.c b/src/xdisp.c
index a7913768d8a..1deda682192 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -23050,7 +23050,8 @@ right_overwritten (struct glyph_string *s)
{
int x = 0, i;
struct glyph *glyphs = s->row->glyphs[s->area];
- int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
+ int first = (s->first_glyph - glyphs
+ + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
int end = s->row->used[s->area];
for (i = first; i < end && s->right_overhang > x; ++i)
@@ -23073,7 +23074,8 @@ right_overwriting (struct glyph_string *s)
int i, k, x;
int end = s->row->used[s->area];
struct glyph *glyphs = s->row->glyphs[s->area];
- int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
+ int first = (s->first_glyph - glyphs
+ + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
k = -1;
x = 0;
diff --git a/src/xterm.c b/src/xterm.c
index f0f6702cd67..e5a5932beae 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2975,6 +2975,7 @@ x_draw_glyph_string (struct glyph_string *s)
XSetClipMask (next->display, next->gc, None);
next->hl = save;
next->num_clips = 0;
+ next->clip_head = s->next;
}
}
}