From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50660: 28.0.50; Text artifacting when the cursor moves over text under mouse face that originally displayed a box Date: Thu, 14 Oct 2021 19:54:38 +0800 Message-ID: <87mtnblt35.fsf@yahoo.com> References: <87czp6ysw7.fsf.ref@yahoo.com> <8335pz3dli.fsf@gnu.org> <87r1dj4q4m.fsf@yahoo.com> <83zgs71su7.fsf@gnu.org> <87k0jb4k5l.fsf@yahoo.com> <83sfxz1pw0.fsf@gnu.org> <87o88m14g0.fsf@yahoo.com> <83sfxyxeer.fsf@gnu.org> <87h7ee1252.fsf@yahoo.com> <83pmt2xcox.fsf@gnu.org> <87lf3myhlb.fsf@yahoo.com> <87a6jzvnpq.fsf@yahoo.com> <83o88fom1k.fsf@gnu.org> <871r5bvex8.fsf@yahoo.com> <83v92mkzft.fsf@gnu.org> <87k0j0rwo3.fsf@yahoo.com> <838rzbddfa.fsf@gnu.org> <878rzbd1w5.fsf@yahoo.com> <83wnmgkmok.fsf@gnu.org> <878ryvnain.fsf@yahoo.com> <83mtnbltyp.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2876"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: larsi@gnus.org, 50660@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 14 13:55:20 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mazKS-0000Uh-O9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Oct 2021 13:55:20 +0200 Original-Received: from localhost ([::1]:52036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mazKR-0008M7-Ds for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Oct 2021 07:55:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mazKA-0008Lk-Ak for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 07:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mazKA-0003bZ-1t for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 07:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mazK9-0007Xg-Lo for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 07:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Oct 2021 11:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50660 X-GNU-PR-Package: emacs Original-Received: via spool by 50660-submit@debbugs.gnu.org id=B50660.163421249628977 (code B ref 50660); Thu, 14 Oct 2021 11:55:01 +0000 Original-Received: (at 50660) by debbugs.gnu.org; 14 Oct 2021 11:54:56 +0000 Original-Received: from localhost ([127.0.0.1]:34843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mazK4-0007XJ-DP for submit@debbugs.gnu.org; Thu, 14 Oct 2021 07:54:56 -0400 Original-Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]:33605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mazK0-0007X4-8U for 50660@debbugs.gnu.org; Thu, 14 Oct 2021 07:54:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1634212486; bh=FtYLHrSd1LgFdW+URPYwtFTgASkVu7vve7CkLkn1Kl0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=WPaECOB30CvLQWHaz1S59QGGHutnfQdEgBdpQbuIp9zQl54FcAGlLm1B+fB5HO1CSpUAFTtmQkNqt/GAvgmBUy/E6avt+9YUOpnh7SyGDyiVN+QYpS+AKqKOpkvjuLa5cMRcX4u2zjEAEm3iPQfOsmr++SXkyCIIH2zsLdnZSHSLtFud65rvkEHgsa5zplx/zqbCBcakwc9xKbLftQy/pMFRCHmN3uGdTiK3rpG//STPkO3WNr3+xOyMOn5LgL2QXXNwUVT3t484sCl1Pw3oz75BwZORzbgs5pc4giiC/xsK8Bzgm05ls8d01n6kM/9hunemKwABoza0g5877StWxA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1634212486; bh=Xh1ThV6S/XXJa4PXbuAapdUFHmi+NQ9oX71zLEUu/YW=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=L01BmlyqX8GRstnqIinPT46Y1Mlfm2xRb16kA4Xe5Afj5sSpFiGyy8fhDIXM+htDSpVvu08nZhp4QWh+SC7ijsPvL8rQbwXkpXMUqXdJnqO8HWmRJm0s25SkDuiQIdFpT4IRGwJCVZ+axaWdiVhArbYA/LfvEQPSobc3HUB7q+6IlYRyOZ86mKPGTdA+9MWxYG17J2GD+F5oDfmjd4/VBZ/gJlMuuFvfqhOD4Xs0Y58UNxNs6MTejxhombZsaaQIpgJOHSzx+lHOChRNhjh+qerIuHfakS+HaTwnISrGZbw551N6jyJuTMG5wWd5+wxVeaNdJe+t9Febqtn8ekDtmQ== X-YMail-OSG: hXLVMu4VM1nvAnlboHpKr_BmFARg8CJIThVokeuog.067UOReQpcKA11jh0pB73 jnx0yJoybiKFyYQjEG_egbOBXSUhD3TZBokMWOAjfnlO3r0hdh5bshSvRT.yATXJOpzfgoaF3fRx xkPebUTDnSoM1LI63x_RQXXr2ma0MOedfHR0eNqSs7EPODT6yfa0z.x_RZxXdaNeXCLu1weYnUcn qZE9iCHT0POYB7R2uIS8XNHdv77gS6IB1EXdgDvSTApczOa42Nb7SuEHbDySkE0Durn9CLsWuok. E880TB3hXFy.IkoMwcDphQj51txXTbE66f3gEcemMh8hzB7keVB4ySjY.x.adOzeZ5Yt3Lajefl3 6J0H_moczR3MOtDPVGCRWL7cmAhgEUhWQQrya70zxqhQf6zY.9s_z_NsofP495rhX8pr8g01xY0b RJiz47uSwUKme.m4qWy1BMKiKRnqLVZoIGEl8egNWMhwOSBWVWdrgFl5rQpRMCgMMo9ljA5plXTT doyi2ozBlNLoaxunadhY1Kp6f2DzjUcp.l3pWrk3PVr5QKfVjzBQfoOWre5orwftJeNB3yyw5pAu 034wJzDYF5ZnYdAyTMB0bjLXxgSMMkgRCEzSHVd_1aZ8_PT6RtabO6A_gi8TyEfA9APlPEflJzg3 AuR4riG45JM2GGHA9LcAHYtA1LDbHo2Z2d7WTYtwRdkyiMqYpJphmh8RHytE9gHRjJ4d_L.551tv W7HevGF_52L0TAPxqd3HnKCgO01.CTep_e0A7T_n8MuG7HdTFRFdILWA_hI.YOIn0Gy.rpzF.PVm uPC4Waq4Ia5X8Z4Uc1umFjGiGdokvBL_jl2_9IjYyY X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Thu, 14 Oct 2021 11:54:46 +0000 Original-Received: by kubenode501.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 7c5c3322412d81437f539e1238bc6229; Thu, 14 Oct 2021 11:54:42 +0000 (UTC) In-Reply-To: <83mtnbltyp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Oct 2021 14:35:42 +0300") X-Mailer: WebService/1.1.19116 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217216 Archived-At: Eli Zaretskii writes: >> @@ -1799,11 +1799,24 @@ x_draw_glyph_string_foreground (struct glyph_string *s) >> { >> int i, x; >> >> + struct face *face_for_box_line = s->face; >> + >> + if (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w)) >> + { >> + /* In this situation, the cursor is in the mouse face, but >> + s->face hasn't been updated with the mouse face yet. */ >> + face_for_box_line = >> + FACE_FROM_ID_OR_NULL (s->f, MOUSE_HL_INFO (s->f)->mouse_face_face_id); >> + >> + if (!face_for_box_line) >> + face_for_box_line = FACE_FROM_ID (s->f, MOUSE_FACE_ID); >> + } > Can't we "fix" this face in xdisp.c, before calling the > terminal-specific backend? The bonus will be that we then do it only > in one place. The only way to do that I can think of would be to offset the glyph string's x position (but not the phys cursor) by the vertical box line width, and I think it would be an ugly thing to do, because that would imply lying to the window system backend.