From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Julian Rohrhuber via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#47360: 27.1; using 'bar cursor, mouseclick is rounded to the wrong char position Date: Wed, 24 Mar 2021 17:38:41 +0000 Message-ID: References: <552AAC5C-46DD-418C-958E-949E33D4A697@protonmail.com> <83pmzojwgg.fsf@gnu.org> Reply-To: Julian Rohrhuber Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18282"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47360@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 24 18:40:58 2021 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 1lP7V2-0004bD-7W for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Mar 2021 18:40:56 +0100 Original-Received: from localhost ([::1]:49578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP7Uz-00068s-7a for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Mar 2021 13:40:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP7TC-00067j-EB for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2021 13:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP7TB-0008VO-Jp for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2021 13:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lP7TB-0007xK-Hu for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2021 13:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Julian Rohrhuber Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Mar 2021 17:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47360 X-GNU-PR-Package: emacs Original-Received: via spool by 47360-submit@debbugs.gnu.org id=B47360.161660753430568 (code B ref 47360); Wed, 24 Mar 2021 17:39:01 +0000 Original-Received: (at 47360) by debbugs.gnu.org; 24 Mar 2021 17:38:54 +0000 Original-Received: from localhost ([127.0.0.1]:36040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP7T3-0007wy-NG for submit@debbugs.gnu.org; Wed, 24 Mar 2021 13:38:53 -0400 Original-Received: from mail2.protonmail.ch ([185.70.40.22]:49244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP7T1-0007wl-OC for 47360@debbugs.gnu.org; Wed, 24 Mar 2021 13:38:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616607524; bh=ra3Ub9WoOj4DDnlhEUVyLAmF/Xe89TvGtlqTefG5riw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=xrxMT3EeZuAbWI6huBj/l6WRdjD2936zjdeT9yt6V2wy75ixoMximRRo1CW180EIy s8NCok0VN2cRmP/g4SbAz6mfLQN+pg1VnuYZtWEDortNkAMKxdBL1e6HE/4kuVCFul /yHFCMmWMf2i48Pv/Y46F4LRbzR6kaw2W0+l5LEA= In-Reply-To: <83pmzojwgg.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" X-ACL-Warn: , Julian Rohrhuber Xref: news.gmane.io gmane.emacs.bugs:202958 Archived-At: > On 24. Mar 2021, at 18:25, Eli Zaretskii wrote: > >> >> Date: Wed, 24 Mar 2021 07:42:28 +0000 >> From: Julian Rohrhuber via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> When using 'bar as cursor, the click location is truncated to the value = before the character one clicks on (as expected when using a 'box). When us= ing a 'bar, however, one expects that the "hill" is in the center of each c= haracter, and the valley between them. I've made an illustration, where the= green color shows the watershed, so to speak. >> >> This behavior feels subtly broken. >> >> A solution to the issue has been suggested https://emacs.stackexchange.c= om/questions/20279/mouse-pointer-between-characters-and-the-text-cursor-mis= placement >> >> Using the modified function posn-set-point below fixes the issue for me.= I find the behavior also reasonable for 'box, but that might be a matter o= f discussion. > > I don't think I see the problem you describe. If I click exactly on > the bar cursor, the cursor doesn't move, as I'd expect. Sorry, I may not have described the issue well. When clicking into a text, at a random position, the position where the cu= rsor jumps to is calculated. Now this is a bit subtle: when you click on a = character, does the cursor jump to the left of that character or to its rig= ht? When in box mode, it jumps to the left, and here this is correct. But when in bar mode, it should jump to the right when the click is right o= f the middle of the character, and only left when to its left of the middle= . Instead, it also jumps to the left. > In any case, please note that in Emacs the bar cursor is never exactly > between two characters, it is at the left side of a character cell, so > closer to the character on the right (for left-to-right text). That is completely fine, what matters is only how the right-vs-left is calc= ulated.