From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Moving point after character when clicking latter half of it Date: Tue, 11 Jul 2023 15:29:57 +0300 Message-ID: <83r0pe7hru.fsf@gnu.org> References: <2255158.iZASKD2KPV@silef> <3255279.aeNJFYEL58@silef> <83ttuc7x3k.fsf@gnu.org> <3431515.QJadu78ljV@anduin> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35153"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Moritz Maxeiner , Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 11 14:30:59 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qJCW9-0008uv-Py for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Jul 2023 14:30:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJCV1-0007wO-82; Tue, 11 Jul 2023 08:29:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJCV0-0007w1-9p for emacs-devel@gnu.org; Tue, 11 Jul 2023 08:29:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJCUz-0000aX-QA; Tue, 11 Jul 2023 08:29:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=7w+FYkFVXbaYuYiiWQpnHRSuvUbMWsWhXeybd2XTjY8=; b=PBdh+SmuIaft DZWIwtIQXWO94ywDg4av21BrAhWpuMq56a6rQiPQpMH0jnqWfNf1Fzi8i9RR6nOytrzIL3ULQKLV6 nNdWQXuuQQxTmXdARv/i/y2taossQRQVwrXKz8ThmUXyjQntExrdAB2oB4xWFp9V/PpwZsOLMpzvF GqfkRy9/XX6iLJz1Pzkkeeq27Am5MX0Q/3RfxV02m/06iX8ZdHFvmS8wQgMQ7Tt/HalOhSc15tio8 CJ955oB591PMzuh/jnyKQfigbAURY2EEmpEhn391rugGIOemHQtbOUktwjXtqhoF6Qc9K2J1tNdmE AgIlXMyV0y0RVtiEWRRhRg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJCUz-0005Mk-97; Tue, 11 Jul 2023 08:29:45 -0400 In-Reply-To: <3431515.QJadu78ljV@anduin> (message from Moritz Maxeiner on Mon, 10 Jul 2023 22:02:23 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307747 Archived-At: > From: Moritz Maxeiner > Cc: emacs-devel@gnu.org > Date: Mon, 10 Jul 2023 22:02:23 +0200 > > On Monday 10 July 2023 14:46:39 CEST Eli Zaretskii wrote: > > It should also be called out in etc/NEWS. > > I agree, but I feel this should be done in the last iteration of the patch, > once all other changes are done. We are basically there. > I had to add another piece of code to src/xterm.c, because while text > selection via mouse dragging did automatically factor in the new optional > behavior after releasing the mouse, it did not update the highlighted / > selected region, as that requires mouse-movement events to be triggered, which > are picked up in mouse.el via mouse-drag-track, which then updated the > highlighted region. That event, however, is only triggered by leaving the > previous glyph, so we need to trigger it while still being on the glyph. > > I tried sending the event only when crossing the vertical midline of the > glyph, but for a reason unknown to me, sending the event only once did not > result in the highlight being updated when dragging the mouse to the right, > only to the left. > > As a workaround, I now trigger the event always while dragging with the > optional behavior on. If there is a more elegant solution I don't see I'd > welcome it. For now the overhead doesn't seem noticeable in practice. I'm not sure this is TRT. In particular, it sounds like the change you made in xterm.c also overrides the Y coordinate condition? that doesn't sound right to me. Po Lu, WDYT about this? The other changes LGTM, thanks.