From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#38013: [PATCH] Rectangular region selection with mouse Date: Sun, 10 Nov 2019 14:49:11 +0100 Message-ID: <60DD9D65-C3F0-470E-8489-B333E1889D32@acm.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> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="218719"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38013@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 10 14:50:14 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 1iTnbY-000uiS-7F for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Nov 2019 14:50:13 +0100 Original-Received: from localhost ([::1]:43368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTnbW-0006Ap-3s for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Nov 2019 08:50:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39950) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTnbP-00069H-Kj for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2019 08:50:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTnbO-0006pA-J0 for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2019 08:50:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41972) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTnbO-0006ox-G7 for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2019 08:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iTnbO-0008Md-Bx for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2019 08:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Nov 2019 13:50:02 +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.157339375932092 (code B ref 38013); Sun, 10 Nov 2019 13:50:02 +0000 Original-Received: (at 38013) by debbugs.gnu.org; 10 Nov 2019 13:49:19 +0000 Original-Received: from localhost ([127.0.0.1]:50793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTnah-0008LX-3d for submit@debbugs.gnu.org; Sun, 10 Nov 2019 08:49:19 -0500 Original-Received: from mail224c50.megamailservers.eu ([91.136.10.234]:56732 helo=mail33c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTnae-0008LN-OC for 38013@debbugs.gnu.org; Sun, 10 Nov 2019 08:49:18 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1573393754; bh=UccSksed8DsbKD5Cv6zQKACJR4cfak0gVXCM2oojesA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=RPEcGoPQNIPCJ0m064QbKlKATzQLEH0Z7drKPq41YKh48nleB7BkBm42elA8qez9/ cTgvn8vlN9FLjOu6/0D2YKfEBG+1eDOJGi5MzFKPrRJtFuNuW+uxLkfj0dTsvYbrFv kMhFHyoZkC0V+6/8uOEU3/1s2A5Flm7/msoRZYn8= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.64] (c-ee54e353.032-75-73746f71.bbcust.telenor.se [83.227.84.238]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id xAADnCWm011387; Sun, 10 Nov 2019 13:49:14 +0000 In-Reply-To: <83bltk95p7.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020C.5DC8155A.0032, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=ccisUULM c=1 sm=1 tr=0 a=Fmb7hdz85/yTNbhpOvpRKA==:117 a=Fmb7hdz85/yTNbhpOvpRKA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=3z7fAHghEl-IxR7kj2EA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 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:171381 Archived-At: 9 nov. 2019 kl. 21.04 skrev Eli Zaretskii : > I still see a 1-pixel thin "region" sometimes, which causes the text > to move horizontally. Such 'thin' regions (0 cells wide) are legitimate and useful for marking = a vertical span of insertion points. For example, they can be used with = 'C-x r t' or 'C-x r N'. They are produced in keyboard-based rectangle = selection (C-x SPC C-n C-n C-n) as well. > More importantly, if I drag the mouse through a > TAB, it moves in jumps of several columns, not one column at a time. The reason is that 'mouse-movement' events are not generated as long as = the mouse stays within the same glyph, and a tab counts as a (suitably = wide) single glyph. It can be worked around by zig-zagging the mouse a = bit, but I agree it's untidy. Fixing this requires some work on the lower-level plumbing which I'd = hoped to avoid. One possibility is to add a global flag that forces = 'remember_mouse_glyph' to consider all text glyphs to have nominal char = width, or just zero width. 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) =20 if (g < end) { - if (g->type =3D=3D IMAGE_GLYPH) + if (g->type =3D=3D IMAGE_GLYPH || g->type =3D=3D = STRETCH_GLYPH)