unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: David Reitter <david.reitter@gmail.com>, 1372@emacsbugs.donarmstrong.com
Cc: Jin Choi <jsc@alum.mit.edu>
Subject: bug#1372: posn-at-x-y reports wrong window
Date: Wed, 19 Nov 2008 16:09:39 +0100	[thread overview]
Message-ID: <49242C33.4090702@gmx.at> (raw)
In-Reply-To: <BF96836F-1F03-470E-9077-AA680A2D4B27@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

 > (fringe-mode 0)
 > C-x 3 C-x 2 C-x o C-x o
 > (we're now in the large window on the right, with two small windows in
 > the left half of the frame).
 >
 > Insert enough newlines to be vertically just above the horizontal
 > divider on the left.
 >
 > M-: (posn-at-x-y 0 (cdr (posn-x-y (posn-at-point)))) RET
 >
 > Insert newline, now we're next to the divider line.
 >
 > M-: (posn-at-x-y 0 (cdr (posn-x-y (posn-at-point)))) RET
 >
 > --> wrong window (the window in the upper left) is given in the structure.
 > Instead of 0, the x value can be up to 6 ((frame-char-width) reports 7).

Can you try the attached patch?

martin

[-- Attachment #2: 1372.diff --]
[-- Type: text/plain, Size: 589 bytes --]

*** window.c.~1.634.~	2008-11-18 18:56:23.703125000 +0100
--- window.c	2008-11-19 16:04:02.078125000 +0100
***************
*** 774,780 ****
  	}
        else
  	{
! 	  if (eabs (*x - x1) < grabbable_width)
  	    {
  	      /* Convert X and Y to window relative coordinates.
  		 Vertical border is at the right edge of window.  */
--- 774,781 ----
  	}
        else
  	{
! 	  if ((WINDOW_RIGHTMOST_P (w) || *x < x1)
! 	      && eabs (*x - x1) < grabbable_width)
  	    {
  	      /* Convert X and Y to window relative coordinates.
  		 Vertical border is at the right edge of window.  */

  reply	other threads:[~2008-11-19 15:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <356ECE88-9412-46FD-A227-C52D5C87E212@mac.com>
2008-11-19  0:45 ` bug#1372: posn-at-x-y reports wrong window David Reitter
2008-11-19 15:09   ` martin rudalics [this message]
2008-11-19 15:27     ` David Reitter
2008-11-20 10:30   ` bug#1372: marked as done (posn-at-x-y reports wrong window) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49242C33.4090702@gmx.at \
    --to=rudalics@gmx.at \
    --cc=1372@emacsbugs.donarmstrong.com \
    --cc=david.reitter@gmail.com \
    --cc=jsc@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).