wasamasa / eyebrowse

A simple-minded way of managing window configs in emacs
GNU General Public License v3.0
437 stars 24 forks source link

Switching between window configurations with region active #57

Closed sw9 closed 7 years ago

sw9 commented 7 years ago

I am using Emacs 25.1. If I have a region active and switch between window configurations, when I switch back, the region is permanently highlighted. The only way to reset the highlighting is to kill the buffer and reopen it. As a work around, I added (deactivate-mark) to the eyebrowse-pre hook, but maybe there should be some update made to the package itself.

wasamasa commented 7 years ago

Thanks for the bug report! I can reproduce this on the latest version.

wasamasa commented 7 years ago

According to bisection, this bug was always there ever since I've introduced window-state-get and window-state-put as the new backend. My problem is that inspecting its workings in the debugger appears to undo the bug...

wasamasa commented 7 years ago

It appears that in Emacs 25.1, the update of the region overlay is implemented as a redisplay function that fetches its previous state from the current window and operates on it. As switching out window configurations the current way (as opposed to the old way which was more "atomic") makes it malfunction, I guess only a workaround will do...