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.bugs Subject: bug#38013: [PATCH] Rectangular region selection with mouse Date: Sat, 16 Nov 2019 14:35:41 +0200 Message-ID: <83ftio6lsy.fsf@gnu.org> References: <83lft0m3ug.fsf@gnu.org> <3541E0E8-9E33-4FBD-B0D9-DFF77C241F6F@acm.org> <83y2wzlorw.fsf@gnu.org> <83v9s3lo5f.fsf@gnu.org> <75EC4FBC-F636-4D75-BAC4-982D85188794@acm.org> <9b9222ad-ead7-d0a0-0602-780d0680f070@gmx.at> <6bf229f4-c22f-c3c2-5158-5235f908de3c@gmx.at> <8ec84837-172c-1ce5-cab0-b4c96a86274e@gmx.at> <411EAB4E-B666-4263-8514-5F47391268B1@acm.org> <2df02c1f-fea4-f764-eba6-fd67de581755@gmx.at> <3b74a108-28e3-fd01-64a5-7c4302e3d979@gmx.at> <9A9D13F2-1F4F-4DD4-B92F-96FC4D91DFBD@acm.org> <83pni17x5b.fsf@gnu.org> <8B95D2D3-8E00-45BF-B57D-EFD49D79EB6A@acm.org> <83bltk95p7.fsf@gnu.org> <60DD9D65-C3F0-470E-8489-B333E1889D32@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="89672"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38013@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 16 13:36:18 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 1iVxJJ-000N2B-1r for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Nov 2019 13:36:17 +0100 Original-Received: from localhost ([::1]:47634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVxJB-000705-CT for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Nov 2019 07:36:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36116) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVxJ5-0006zy-1N for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 07:36:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVxJ4-0004vR-2F for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 07:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iVxJ3-0004vN-VS for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 07:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iVxJ3-0001V9-Pl for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2019 07:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2019 12:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38013 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 38013-submit@debbugs.gnu.org id=B38013.15739077525749 (code B ref 38013); Sat, 16 Nov 2019 12:36:01 +0000 Original-Received: (at 38013) by debbugs.gnu.org; 16 Nov 2019 12:35:52 +0000 Original-Received: from localhost ([127.0.0.1]:37817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVxIt-0001Ue-OX for submit@debbugs.gnu.org; Sat, 16 Nov 2019 07:35:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVxIr-0001UN-IP for 38013@debbugs.gnu.org; Sat, 16 Nov 2019 07:35:50 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVxIl-0004r6-QU; Sat, 16 Nov 2019 07:35:43 -0500 Original-Received: from [176.228.60.248] (port=4106 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iVxIl-0005e1-4n; Sat, 16 Nov 2019 07:35:43 -0500 In-reply-to: <60DD9D65-C3F0-470E-8489-B333E1889D32@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Sun, 10 Nov 2019 14:49:11 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:171720 Archived-At: > From: Mattias EngdegÄrd > Date: Sun, 10 Nov 2019 14:49:11 +0100 > Cc: rudalics@gmx.at, 38013@debbugs.gnu.org > > Or even simpler: assuming that STRETCH_GLYPHS are mostly tabs, we can treat them as image glyphs for 'remember_mouse_glyph' purposes. What about: > > --- a/src/xdisp.c > +++ b/src/xdisp.c > @@ -2572,7 +2572,7 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect) > > if (g < end) > { > - if (g->type == IMAGE_GLYPH) > + if (g->type == IMAGE_GLYPH || g->type == STRETCH_GLYPH) Sorry for a late response. Did you try this with stretch glyphs generated by the likes of :align-to display 'space' properties? Also, what about stretch glyphs generated by the display engine in R2L screen lines (you can get those easily by visiting TUTORIAL.he: each line that has white space at its left end has a stretch glyph there)? IOW, it might be necessary to add more conditions here, and just the mouse_movement_in_tab thingy you added in a later version might not be enough. E.g., we may need a condition that verifies that this is a TAB (should be easy by looking at glyph->object, I think).