aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2012-09-11 12:32:41 +0900
committerYAMAMOTO Mitsuharu2012-09-11 12:32:41 +0900
commit3057e615af94af8d08f475208c7e459f5d7115ac (patch)
tree1e784dddfa2fdd42e420cd4ff469d66b4f7f8368
parentc990426a9883c1bd1782e6b117184b654eecda67 (diff)
downloademacs-3057e615af94af8d08f475208c7e459f5d7115ac.tar.gz
emacs-3057e615af94af8d08f475208c7e459f5d7115ac.zip
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 @@
12012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
4 composition cases (Bug#12364).
5
6 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
7 overhang of succeeding glyphs overlapping box cursor.
8
9 * w32term.c (x_draw_glyph_string): Likewise.
10
12012-09-11 Paul Eggert <eggert@cs.ucla.edu> 112012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2 12
3 Simplify, document, and port floating-point (Bug#12381). 13 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)
2591 w32_set_clip_rectangle (next->hdc, NULL); 2591 w32_set_clip_rectangle (next->hdc, NULL);
2592 next->hl = save; 2592 next->hl = save;
2593 next->num_clips = 0; 2593 next->num_clips = 0;
2594 next->clip_head = s->next;
2594 } 2595 }
2595 } 2596 }
2596 } 2597 }
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)
23050 { 23050 {
23051 int x = 0, i; 23051 int x = 0, i;
23052 struct glyph *glyphs = s->row->glyphs[s->area]; 23052 struct glyph *glyphs = s->row->glyphs[s->area];
23053 int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars); 23053 int first = (s->first_glyph - glyphs
23054 + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
23054 int end = s->row->used[s->area]; 23055 int end = s->row->used[s->area];
23055 23056
23056 for (i = first; i < end && s->right_overhang > x; ++i) 23057 for (i = first; i < end && s->right_overhang > x; ++i)
@@ -23073,7 +23074,8 @@ right_overwriting (struct glyph_string *s)
23073 int i, k, x; 23074 int i, k, x;
23074 int end = s->row->used[s->area]; 23075 int end = s->row->used[s->area];
23075 struct glyph *glyphs = s->row->glyphs[s->area]; 23076 struct glyph *glyphs = s->row->glyphs[s->area];
23076 int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars); 23077 int first = (s->first_glyph - glyphs
23078 + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
23077 23079
23078 k = -1; 23080 k = -1;
23079 x = 0; 23081 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)
2975 XSetClipMask (next->display, next->gc, None); 2975 XSetClipMask (next->display, next->gc, None);
2976 next->hl = save; 2976 next->hl = save;
2977 next->num_clips = 0; 2977 next->num_clips = 0;
2978 next->clip_head = s->next;
2978 } 2979 }
2979 } 2980 }
2980 } 2981 }