unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Rossetti <andrea.rossetti@gmail.com>
To: 17788@debbugs.gnu.org
Subject: bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally
Date: Wed, 18 Jun 2014 01:50:33 +0200	[thread overview]
Message-ID: <841tunnliu.fsf@gmail.com> (raw)
In-Reply-To: <847g4gd2in.fsf@gmail.com> (Andrea Rossetti's message of "Mon, 16 Jun 2014 22:26:40 +0200")

Andrea Rossetti <andrea.rossetti@gmail.com> writes:
>
>   The new tentative patch is attached here below:
> ....
> +(defsubst ruler-mode-window-col (start-or-end-event)
> ....
> +  (- (car (posn-col-row start-or-end-event))
> +     (if (eq (posn-area start-or-end-event) 'header-line)
> +         (+
> +          (or (car (window-margins)) 0)
> +          (fringe-columns 'left)
> +          (scroll-bar-columns 'left))
> +       0)))

  Some additional word of comment: 

 - I believe the implicit meaning of the above code is 
   "(car (posn-col-row ...)) is fine in text area, but needs
   to be `adjusted' when the drag is performed in header-line
   area";

- whether this adjustment should really be performed by
  posn-col-row or by ruler-mode-window-col is not very clear
  to me; I conjectured that subr.el provides somewhat
  `lower-level' service functions who probably don't want
  to know about window-margins, fringe-columns,
  scroll-bar-columns, but I might be wrong;

- be aware that dragging the column indicators does not work
  if you use non-zero zoom (C-x C-+ or C-x C--); this is an
  independent problem that the patch does not address; the
  issue would need his own bug report.

  Thanks for reading, kindest regards.

Andrea





  parent reply	other threads:[~2014-06-17 23:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15 19:17 bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally Andrea Rossetti
2014-06-15 22:09 ` Stephen Berman
2014-06-15 23:06   ` Andrea Rossetti
2014-06-15 23:14     ` Andrea Rossetti
2014-06-16  7:11     ` martin rudalics
2014-06-16 20:26       ` Andrea Rossetti
2014-06-16 21:34         ` Stephen Berman
2014-06-17 23:50         ` Andrea Rossetti [this message]
2014-06-16 10:16     ` Stephen Berman
2014-06-16 19:03       ` Andrea Rossetti
2014-06-16  7:11 ` martin rudalics
2020-09-09 11:47 ` Lars Ingebrigtsen
2022-02-22 14:23   ` Lars Ingebrigtsen

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=841tunnliu.fsf@gmail.com \
    --to=andrea.rossetti@gmail.com \
    --cc=17788@debbugs.gnu.org \
    /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).