bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31240: 26.1; mouse-save-then-kill does not kill rectangles


From: Federico Tedin
Subject: bug#31240: 26.1; mouse-save-then-kill does not kill rectangles
Date: Sun, 30 Sep 2018 15:25:57 -0300

> Looking again at this part
>
> +          (line (progn
> +                  (forward-line 0)
> +                  (count-lines (point-min) position))))
>
> I now ask myself why you need to go to the beginning of the line at
> all.  'count-lines' doesn't care about the actual position of point.
> So you either have to do
>
>                    (count-lines (point-min) (point))
>
> or just do
>
>                   (count-lines (point-min) position)
>
> without going to the beginning of the line because POSITION and the
> position at the beginning of its line should be on the same line.

The problem with using just (count-lines (point-min) position) is that
the return value
is different when the point is on column 0 and when it is on column 1
or greater. I
needed to be sure that if the position was anywhere on line N, the
result was N (with
N starting at 0).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]