emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

it->nglyphs for automatic compositions


From: Eli Zaretskii
Subject: it->nglyphs for automatic compositions
Date: Mon, 22 Aug 2011 20:07:45 +0300

Currently, x_produce_glyphs does not set the it->nglyphs member to
anything, so it stays at zero.  This causes pos-visible-in-window-p to
return incorrect pixel coordinates when invoked on a character that is
at column zero and is a composed character.  Note that
produce_composite_glyph, which is called only on terminal frames, does
set that field.  So I propose the following patch.  Any objections?

=== modified file 'src/xdisp.c'
--- src/xdisp.c 2011-08-22 17:00:40 +0000
+++ src/xdisp.c 2011-08-22 17:05:00 +0000
@@ -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,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]