From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#36550: mouse-face overlay calculation error Date: Sat, 13 Jul 2019 15:10:05 +0200 Message-ID: References: <87v9wc2t8p.fsf@mouse.gnus.org> <831ryu31fc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="259920"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36550@debbugs.gnu.org, linus.kallberg@outlook.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 13 15:11:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1hmHnz-0015Tz-Mz for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jul 2019 15:11:11 +0200 Original-Received: from localhost ([::1]:55302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmHny-00052X-5S for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jul 2019 09:11:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47518) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmHnu-00051I-Tm for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2019 09:11:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmHns-0005fR-Ve for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2019 09:11:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmHnq-0005dT-Qd for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2019 09:11:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmHnq-00026o-JP for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2019 09:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jul 2019 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36550 X-GNU-PR-Package: emacs Original-Received: via spool by 36550-submit@debbugs.gnu.org id=B36550.15630234138039 (code B ref 36550); Sat, 13 Jul 2019 13:11:02 +0000 Original-Received: (at 36550) by debbugs.gnu.org; 13 Jul 2019 13:10:13 +0000 Original-Received: from localhost ([127.0.0.1]:41597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmHn2-00025a-Pe for submit@debbugs.gnu.org; Sat, 13 Jul 2019 09:10:13 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:33376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmHn0-00025P-SV for 36550@debbugs.gnu.org; Sat, 13 Jul 2019 09:10:11 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmHmv-0000nq-BT; Sat, 13 Jul 2019 15:10:07 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUFBhFecKcPGUICAw0H CRUdLXALECkJDBx/kThDAAACLElEQVQ4jV3UTW/jIBAGYNSw27NX4r4ayeRqiaq5Rlu0vjZWSe9s Mr5GCoG/v+9gk344t3kyzDBgq7LfK19y7EPoui4E4uKV8i9KOaXHwjGEA8AEsnNJHuCc8gBqMBHP pUiGxHOkGsdaH+B9qdCtYJlLSS/qMTMRfwLJSIAHg5DlBgYZUv1F/ZziRPkbSFeaE2pwfwda4SGc xm9QKiiNdktd6vAFHiPRdgEZCmrISoAfIZg3mZXAwRiMJHndwKMI4iKonT4yAOfv8HAHA+iMZSkh GwzR/saBrBkB+1thekXLJd8qhCAZSoorA1C5NGA++X2F7g3wd74dGtQaV6UOrwuEBtKU3wMkY0w3 mvoep7Gd034BPgF0ulmiPmA8OcmpXpQ2vdm4x3QWIJlb0XqBziBjf8a/qQIm5T3STNcBLmesj2d6 L7UGAIegnGQ0kIxRMkxwrmX0od5DXwB4Nhvvua/A8wgYV1CD9kwRXdloBXwS2DjnnhQTLh5ZtiM6 rcUl7obBWmwkAhDTtbgaKmzZxhW0WkBShqet5XjMACwv1QFuBRuPDPUNNiLD7jQTdmJLTr7ewZax O2kZoi1/0vhlqR3zHHsUz6mOpIF6joAJwBct+5AamwaZ8csAOal1g06g5BF0GeQNuMMOq8jOM18H OWq/lACQ7Q/H8y+KVydj9Wu8QqCI871Kk58gn0N9cbb/vsJz/cjIhZ9m6bJBpvDx0ElqDEu8v0fx nZjR6X/Glg5bq1IKowAAAABJRU5ErkJggg== In-Reply-To: <831ryu31fc.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Jul 2019 09:15:35 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162873 Archived-At: Eli Zaretskii writes: > Mouse-face isn't supposed to cover newlines, I think. Why do you need > that? Because Widget wants to have the mouse-face extend to the end of the line, I think... > The "one character shorter" variant does what it's expected to do, > because mouse-face is not extended to EOL as with other faces. > Mouse-face is for showing the parts of text that are mouse-sensitive, > so it makes no sense to highlight portions of display that have no > text. OK, if this is how mouse-face is supposed to work, then the fix in wid-edit.el should be pretty trivial -- I'll just have it not put the overlay on the newline? >> So is there some basic fault in the code that calculates the length of >> the mouse highlighting? I don't really know where to start looking... > > It's in the display code, and is quite complicated due to > bidirectional text use case. See mouse_face_from_buffer_pos and its > subroutine rows_from_pos_range. Oh, wow; that's a daunting function indeed... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no