[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52092: 28.0.60; hs-toggle-hiding does not toggle once folded
From: |
Stefan Monnier |
Subject: |
bug#52092: 28.0.60; hs-toggle-hiding does not toggle once folded |
Date: |
Sat, 24 Sep 2022 11:10:26 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
[ Added Thien-Thi and Dan to the Cc since they're listed as maintainers
of `hideshow.el`. ]
kobarity [2022-09-24 14:59:56] wrote:
> Stefan Monnier wrote:
>> The patch below should fix it.
> Thanks, I didn't know `last-nonmenu-event'. I confirmed that the
> patch enables the mouse to hide the clicked block.
I pushed it to the `emacs-28` branch, because it's fixing a stupid regression.
>> I had no idea that (posn-point (posn-at-point POS)) doesn't return POS
>> if POS is within an invisible chunk of text and instead returns the next
>> visible position.
>>
>> I'll have to think about how best to fix the consequence.
>
> Thank you for consideration.
I pushed to `master` a patch which makes `event-end` return a position
that's always at `point` for keyboard events, even if `point` is hidden.
That should bring back the previous behavior (it's not safe enough for
the `emacs-28` branch, sadly).
But I think your patch is still an improvement since it makes
`hs-toggle-hiding` work even when point is right after the hidden block.
I also like the additional tests you provide.
So I adjusted it to the new code and pushed it to `master`.
Thank you,
Stefan