From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question about display engine Date: Mon, 14 Oct 2019 00:01:46 +0300 Message-ID: <83y2xojr5x.fsf@gnu.org> References: <20191012222305.jpjinkd5y2lz6xiv@Ergus> <83mue5kmfx.fsf@gnu.org> <20191013154052.yzluijtwvf2ppvks@Ergus> <83a7a4ljet.fsf@gnu.org> <20191013164424.4vyxdnm6ievyvjyf@Ergus> <837e58lgql.fsf@gnu.org> <20191013182542.34euwh2gihawyots@Ergus> <831rvglbom.fsf@gnu.org> <20191013193836.jl3odnemyh6l7hzb@Ergus> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="88706"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 13 23:02:09 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJl0B-000Mtn-I0 for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 23:02:07 +0200 Original-Received: from localhost ([::1]:42404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJl09-0008Hu-NI for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 17:02:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44495) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJkzz-0008Hn-TY for emacs-devel@gnu.org; Sun, 13 Oct 2019 17:01:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJkzy-0003VW-0S; Sun, 13 Oct 2019 17:01:54 -0400 Original-Received: from [176.228.60.248] (port=1301 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJkzx-00072A-Ep; Sun, 13 Oct 2019 17:01:53 -0400 In-reply-to: <20191013193836.jl3odnemyh6l7hzb@Ergus> (message from Ergus on Sun, 13 Oct 2019 21:38:36 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240987 Archived-At: > Date: Sun, 13 Oct 2019 21:38:36 +0200 > From: Ergus > Cc: rudalics@gmx.at, emacs-devel@gnu.org > > (gdb) p it->sp > $1 = 0 > (gdb) p it->method > $2 = GET_FROM_C_STRING If we are producing glyphs from a C string, then faces should not be used at all, because C strings cannot have faces. So you should to condition the call to face_at_pos on something like it->s == NULL because there can not be any face on any position of a C string. > (gdb) pgrowx it->glyph_row > TEXT: 85 glyphs > 0 0: CHAR[-] str=0x4fab1a8f[0] blev=0,btyp=L w=1 a+d=0+0 face=1 > 1 1: CHAR[U] str=0x4fab18f0[1] blev=0,btyp=L w=1 a+d=0+0 face=1 > 2 2: CHAR[U] str=0x4fab18f0[1] blev=0,btyp=L w=1 a+d=0+0 face=1 > 3 3: CHAR[U] str=0x4fab18f0[1] blev=0,btyp=L w=1 a+d=0+0 face=1 > 4 4: CHAR[:] str=0xf2787f0[0] blev=0,btyp=L w=1 a+d=0+0 face=1 > 5 5: CHAR[%] str=0x4faaee54[1] blev=0,btyp=L w=1 a+d=0+0 face=1 > 6 6: CHAR[%] str=0x4faaede4[1] blev=0,btyp=L w=1 a+d=0+0 face=1 > 7 7: CHAR[-] str=0x4fab1721[1] blev=0,btyp=L w=1 a+d=0+0 face=1 > 8 8: CHAR[-] str=0x4fa9d9a8[0] blev=0,btyp=L w=1 a+d=0+0 face=1 > 9 9: CHAR[F] str=0x4fa9d9a8[2] blev=0,btyp=L w=1 a+d=0+0 face=1 > 10 10: CHAR[1] str=0x4fa9d9a8[2] blev=0,btyp=L w=1 a+d=0+0 face=1 This is a mode line, so it figures out: extend_face_to_end_of_line was called when the iterator was processing the final blanks of the mode line, see display_mode_line.