[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: |
martin rudalics |
Subject: |
bug#31240: 26.1; mouse-save-then-kill does not kill rectangles |
Date: |
Sat, 06 Oct 2018 19:08:51 +0200 |
> The example Homeros tried to run won't work, because the newly intersected
> rectangle would intersect the original rectangle. This behaviour is
> intentional, as it
> is similar to mouse-drag-and-drop-region's behaviour with non-rectangle
regions.
>
> However, I think an exception could be made for rectangle operations move the
> rectangle horizontally to the left, as Tak said. When the rectangle is
> dragged to the left,
> there's no way its content could be accidentally added to the overlays
> tracking the original
> rectangle, so it'll always work correctly (even if
> rectangle-intersect-p returns t).
FWIW I see no problems with the following naive amendment
(let ((size (cons region-width region-height)))
(and (rectangle-intersect-p
(rectangle-position-as-coordinates start)
size
(rectangle-position-as-coordinates
point-to-paste) size)
(not (= (line-number-at-pos start)
(line-number-at-pos
point-to-paste)))))
which also allows shifting the rectangle strictly to the left or
right. IIUC it's the deletion of the original rectangle after the
copy was inserted on a different line that's causing havoc with
intersections. But I have not tested all possible variants so please
correct me if I'm wrong.
martin
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/01
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/10/01
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/02
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/10/02
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/02
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Homeros Misasa, 2018/10/03
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/05
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Tak Kunihiro, 2018/10/05
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/10/05
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles,
martin rudalics <=
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/10/06
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/07
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Tak Kunihiro, 2018/10/08
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/10/08
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/09
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/10
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/10/11
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/12
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/10/12
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/10/13