From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58176: 29.0.50; mouse-set-point region flicker with highlight-nonselected-windows=t and same buffer in two windows Date: Thu, 29 Sep 2022 23:09:37 +0200 Message-ID: <87wn9lubu6.fsf@miha-pc> References: <86pmfeaxnv.fsf@miha-pc> <838rm2f1v8.fsf@gnu.org> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9536"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58176@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 29 22:56:14 2022 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 1oe0Zo-0002HG-SW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 22:56:13 +0200 Original-Received: from localhost ([::1]:40448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oe0Zn-0007OP-SW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 16:56:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oe0Ze-0007O2-T0 for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 16:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oe0Ze-00050Y-LY for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 16:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oe0Ze-0000I4-DG for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 16:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Sep 2022 20:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58176 X-GNU-PR-Package: emacs Original-Received: via spool by 58176-submit@debbugs.gnu.org id=B58176.16644849481091 (code B ref 58176); Thu, 29 Sep 2022 20:56:02 +0000 Original-Received: (at 58176) by debbugs.gnu.org; 29 Sep 2022 20:55:48 +0000 Original-Received: from localhost ([127.0.0.1]:39792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oe0ZQ-0000HX-Cq for submit@debbugs.gnu.org; Thu, 29 Sep 2022 16:55:48 -0400 Original-Received: from kamnitnik.top ([209.250.245.214]:50858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oe0ZN-0000HL-Kl for 58176@debbugs.gnu.org; Thu, 29 Sep 2022 16:55:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1664484942; bh=FLNbXC7PlWXDVGYipufuKniGEhWZo/Yg+TUJeoW/jHo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DyqvtRGRh5UaJJaCPqkff2L7BXFZHGH1D4hTu7FUh514yBqcUmi62mWsoryqpN9fW zgRwiNKFrZBIydTgvvMF93vP+9f+BjzwCHMGo5P/NIyhRgUpAH0b5iD1wgg5qAKC2T DbaioupV2Fw/smB9C0nJkqjLBytUt7PnqEub9CiAw4b3Q5j22RmXJKdDECfIi2eoiy yS76ZjdJutpdacqzjsjtCeLmaTxzOJMRrCGqHMUSJIWX8Yt9xW3Yo5EjTIJqarFJrK 7bRMfjU5NHDRQBH9KKPXVW7+K465zSCNl+Sj+CGX0hbUbP42v2mbN9Lt0JveKMALEI 2gL99Z68XxnZg== In-Reply-To: <838rm2f1v8.fsf@gnu.org> 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:243953 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> Date: Thu, 29 Sep 2022 19:38:28 +0200 >> From: miha--- via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> 1. (setq highlight-nonselected-windows t) >> 2. 'C-x 2' >> 3. Click with mouse-1 somewhere to move point >>=20 >> Notice that for the duration mouse-1 being held down for the click, >> region highlighting appears in the non-selected window. Usually the >> click is short so the region only appears for a short time, which can be >> perceived as a somewhat annoying flicker. > > It's a direct consequence of the fact that point is different in each > window. I don't see any bug here, FWIW. If you don't like this side > effect of highlight-nonselected-windows, then don't set it non-nil. Well, maybe we could try a bit harder to reduce the flicker for ordinary non-dragging mouse-1 clicks. One idea could be to prevent down-mouse-1 from activating mark until the region becomes non-zero length, so something like this patch. diff --git a/lisp/mouse.el b/lisp/mouse.el index e38a4f8a71..a0f48de923 100644 =2D-- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1729,7 +1729,7 @@ mouse-drag-track '(only) (cons 'only transient-mark-mode))) (let ((range (mouse-start-end start-point start-point click-coun= t))) =2D (push-mark (nth 0 range) t t) + (push-mark (nth 0 range) t (not (eql (nth 0 range) (nth 1 rang= e)))) (goto-char (nth 1 range))) =20 (setf (terminal-parameter nil 'mouse-drag-start) start-event) @@ -1794,7 +1794,10 @@ mouse--drag-set-mark-and-point (goto-char beg)) (t (set-mark beg) =2D (goto-char end))))) + (goto-char end))) + (unless mark-active + (unless (eql beg end) + (activate-mark 'no-tmm))))) =20 ;; Commands to handle xterm-style multiple clicks. (defun mouse-skip-word (dir) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmM2CZETHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP3t8D/9RJmzT1zcSgQ610ENgmoLXTE3EKuUg 5mUngkjVrTiDvbzzVytK0MFeBZce2xp5HKpfTd48FgBgmm1+k06FgAEpRDSWxslq FfSLTBMRoLYJR+W+KAsVthimmG6DW6FfT+PIzAKTpiF93b3NKhnwRBgPgWf9Xg8Y HnpdQZK0b/yyS0hwv3GoYUVrMsBlmq7quCsa5+lzpq8HR1gh+qJPLxXdU2Ha/XRd Pb1OE23i9jV0Fh2mti3zOqpGs6iYlQw+u5MSwUO0DH/YigyjiwqfsFqmhdCox+RA H3dFLJQ0VF3U+6YQE+DBRjFdeoIpRqx73f9X9B/lYo/GvXVutEYwBOeNSiTkQ3Ds yVXhudZbRUdF7nOGKEresuHjmqC48zGHqyDSX0aMSgaSxF5ze6mS4eUAFc8yj6c5 4f6TwP/fFimXzIJtyKAVazmJTe8h7GCPXeu4QxneikO9bhTNLK1162h4PTOufJVc CxWZxJKxMePd2rKZve4dVRJOy+Rb30fYCbhg6qZoepW20fr2ylI5GWLtmhVaoyKn XrM88uNYAml2RfnAWx5rmaK2n+tuhGbhFjakJsxJ/T6LiCkJCJ1gTol/uT17iohQ CclnO9/WAQGBtdgDqMjHfeLd0AalSXZFgTbHOapWWKh63HvEhAplXv08TIe4i2p3 59BAOFDih4ib8w== =4RaE -----END PGP SIGNATURE----- --=-=-=--