[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag th
From: |
Stephen Berman |
Subject: |
bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally |
Date: |
Mon, 16 Jun 2014 12:16:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux) |
On Mon, 16 Jun 2014 01:06:55 +0200 Andrea Rossetti <andrea.rossetti@gmail.com>
wrote:
> Thanks Stephen for having tested at your side.
>
>> (1) I see # jump whenever the mouse pointer is moved off the ruler while
>> holding down mouse-2, regardless of which direction you drag in
>> ...
>
> Yes, (1) is the same for me.
>
>> (2) If you don't set the left margin, I see # jump as follows:
>> - If you drag from # straight down (due south), # jumps three
>> columns to the left.
>> - If you drag from # southeast by one character, # jumps two columns
>> to the left.
>> - If you drag from # southeast by two characters, # jumps one column
>> to the left.
>> - If you drag from # southeast by more than two characters, # does
>> not jump to the left.
>> - If you drag from # southwest, # slides (but doesn't jump) to
>> whatever column you stop the drag on. Moreover, once you drag #
>> southwest, you can slide # anywhere while holding mouse-2 with the
>> mouse pointer in the text area, just like when it is on the rule.
>>
>
> I can't replicate any of the cases in (2); I always get 1 column hop.
>
>> (3) If you set the left margin, the the number of columns jumped by
>> dragging due south equals (margin width + 3), if I'm not mistaken.
>
> In my setup I see the indicator jumps left for (margin width + 1)
> columns. I'm afraid some other window parameters may be involved,
> for example:
>
> - if you have a leftside fringe (I have it)
Me too (as well as right fringe).
> - if you have a leftside scrollbar (I only have it rightside)
I do indeed that the scroll bar on the left (it's also a non-toolkit
scroll bar, FWIW).
> - (maybe?) if your window manager sets thick window borders
> (I have just 3-4 pixel borders)
Do you mean X-window borders, i.e., Emacs frame borders? If so, I have
one pixel wide borders.
> I wrote a (quite rough) patch that seems to resolve all "hop"
> problems on my installation. May I please ask if anyone has time
> and patience to try the patch and report if it provides some benefit.
With your patch, I still get a jump of # when I drag the mouse pointer
down out of the ruler, but now only by two columns to the left,
regardless of whether I set the left margin or not.
> -(defsubst ruler-mode-window-col (n)
> +(defsubst ruler-mode-window-col (start-or-end-event)
> "Return a column number relative to the selected window.
> -N is a column number relative to selected frame."
> - (- n
> - (car (window-edges))
> - (or (car (window-margins)) 0)
> - (fringe-columns 'left)
> +START-OR-END-EVENT is the start point or end point of a mouse
> +click or mouse drag event.
> +
> +See also: `event-start', `event-end', `posn-col-row', `posn-area'.
> +"
> + (- (car (posn-col-row start-or-end-event))
> + (if (eq (posn-area start) 'header-line)
^^^^^
I guess this should be `start-or-end-event' (otherwise the byte compiler
warns about a free variable).
> + (+ (or (car (window-margins)) 0) (fringe-columns 'left))
> + 0)
Steve Berman
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Andrea Rossetti, 2014/06/15
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Stephen Berman, 2014/06/15
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Andrea Rossetti, 2014/06/15
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Andrea Rossetti, 2014/06/15
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, martin rudalics, 2014/06/16
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Andrea Rossetti, 2014/06/16
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Stephen Berman, 2014/06/16
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Andrea Rossetti, 2014/06/17
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally,
Stephen Berman <=
- bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, Andrea Rossetti, 2014/06/16
bug#17788: 24.3; ruler-mode: column indicators "hop" left if you drag them diagonally, martin rudalics, 2014/06/16