From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Clicks map to wrong line with line-spacing > nil. Date: Sat, 01 Aug 2015 13:03:02 +0300 Message-ID: <83si83uy09.fsf@gnu.org> References: <836150vx9l.fsf@gnu.org> <831tfnwk56.fsf@gnu.org> <87egjnpibn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1438423402 29708 80.91.229.3 (1 Aug 2015 10:03:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2015 10:03:22 +0000 (UTC) Cc: koppel@ece.lsu.edu, emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 01 12:03:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZLTdI-0003eF-LP for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2015 12:03:12 +0200 Original-Received: from localhost ([::1]:53158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLTdH-00076m-Rb for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2015 06:03:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLTdE-00074p-TQ for emacs-devel@gnu.org; Sat, 01 Aug 2015 06:03:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLTdB-0002GB-LP for emacs-devel@gnu.org; Sat, 01 Aug 2015 06:03:08 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:41212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLTdB-0002Ei-Dp; Sat, 01 Aug 2015 06:03:05 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NSE00E00E6LW300@a-mtaout23.012.net.il>; Sat, 01 Aug 2015 13:03:03 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NSE00E7QEL3TB40@a-mtaout23.012.net.il>; Sat, 01 Aug 2015 13:03:03 +0300 (IDT) In-reply-to: <87egjnpibn.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188260 Archived-At: > From: Tassilo Horn > Cc: David Koppelman , emacs-devel@gnu.org > Date: Sat, 01 Aug 2015 09:40:44 +0200 > > I can reproduce with emacs -Q and eb0f65b4. Here's a recipe: Thanks. I am still not sure what are we talking about. I can almost say "not reproducible here", but see below. First, please try the latest master. > 1. emacs -Q > 2. C-h h to open the HELLO file > 3. M-: (setq line-spacing 50) > Here, that's immediately visible. > (window-size nil t) => 96, (window-size) => 47 but actually > with this spacing there are only 11 lines visible, i.e., I see > the HELLO portion from line 1 to the second line of the South > Asia entry. That's not a problem, since window-size reports the height in canonical character units, disregarding the line-spacing. > 4. When I click on some word in lines 1-3, point is set on that word. > In later lines, point ends up on the previous line. For ex., I > click on the "examples" in "Non-ASCII examples:" and point is set > to the beginning of the empty line before. Clicking on "South" in > "South Asia:" puts point on "Middle" in "Middle/Near East:". Does point get set always on the _previous_ line? Because the original report said something different, AFAIU: > try clicking on a line towards the bottom of the window. The > cursor moves to a point well above the mouse pointer. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To me, "well above" doesn't sound like the previous line, but several lines above that. That I certainly cannot see. As to setting point to the previous line, are you sure you don't click on the spacing reserved below the characters of the previous line? Setting line-spacing to a large value adds that many pixels _below_ the characters, so if you click slightly above the character, you are actually clicking on the previous line. > Doing the same with line-spacing set to 10, the problem becomes worse. > Again, clicking on the first 3 lines works correctly, then on the next > 2-3 lines jumps to the line before, then clicking on the next few lines > makes point jump to 2 lines before the click position, etc. So it > becomes worse for the lines displayed later in a window. I don't see the 2-line jump at all. I sometimes see a 1-line jump, but I think that's because I click on the spacing below the previous line. Could it be that the problem depends on how many empty lines are between the window start and the location of the click? If so, this might be one consequence of bug#21165, which I fixed a few minutes ago.