From 1a2e6670cf53a76bfd134c8453f81a2de8c6ea5c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 23 Aug 2011 10:01:25 +0300 Subject: [PATCH] Fix pos-visible-in-window-p for zero-column composed character. src/xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel coordinates reported by pos-visible-in-window-p for a composed character in column zero. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a1a826d625f..ffb8dd76366 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-23 Eli Zaretskii + + * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel + coordinates reported by pos-visible-in-window-p for a composed + character in column zero. + 2011-08-23 Stefan Monnier * cmds.c (Fself_insert_command): Mention post-self-insert-hook. diff --git a/src/xdisp.c b/src/xdisp.c index 1878327480f..9b2b0da4317 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -24064,6 +24064,8 @@ x_produce_glyphs (struct it *it) Lisp_Object gstring; struct font_metrics metrics; + it->nglyphs = 1; + gstring = composition_gstring_from_id (it->cmp_it.id); it->pixel_width = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to,