unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* it->nglyphs for automatic compositions
@ 2011-08-22 17:07 Eli Zaretskii
  2011-08-23  0:35 ` Kenichi Handa
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2011-08-22 17:07 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel

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,




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-23  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 17:07 it->nglyphs for automatic compositions Eli Zaretskii
2011-08-23  0:35 ` Kenichi Handa
2011-08-23  7:07   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).