[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, 23 Sep 2018 19:23:13 -0300 |
> Thanks, this looks good. I think we also need a similar change for
> function "mouse-drag-and-drop-region", which is used when the variable
> of the same name is non-nil. For example, the following recipe
> exposes it:
>
> M-x set-variable RET mouse-drag-and-drop-region RET t RET
> M-< C-SPC M-f C-n C-x SPC
> Drag the rectangle region with the mouse, and its shape is ignored
>
> Hopefully we can apply the same kind of change in that function too.
You're right about mouse-drag-and-drop-region, it doesn't work
correctly when using rectangular regions. After taking a look at the
code, I managed to fix two things: the dragged text now has the
correct rectangular contents (but the original text is incorrectly
deleted using a normal region), and the tooltip displaying the dragged
text also shows the correct contents.
To fix the rest of the functionalities, I would need to know the
recommended way of handling some of the details of how
mouse-drag-and-drop-region is implemented:
- The dragged region is tracked using an overlay. From what I
understand, this is a problem since overlays only handle regions
with a single beginning and end, and rectangles have one or more of
those.
- In order to check if the dragged text is read-only, the function
"next-single-char-property-change" is used. This function has the
same problem as the overlay, as it assumes the region is contiguous.
I'm thinking both problems could be solved by using a list of overlays
instead of just one, creating them from the result of calling
"region-bounds". Then, the rest of the function could be adapted to
use the overlay list.
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/09/11
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Charles A. Roelli, 2018/09/12
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/09/22
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Charles A. Roelli, 2018/09/23
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles,
Federico Tedin <=
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Charles A. Roelli, 2018/09/24
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/09/25
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Charles A. Roelli, 2018/09/27
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/09/27
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/09/28
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/09/29
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, martin rudalics, 2018/09/30
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Charles A. Roelli, 2018/09/30
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Federico Tedin, 2018/09/30
- bug#31240: 26.1; mouse-save-then-kill does not kill rectangles, Eli Zaretskii, 2018/09/30