You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
M-x topspace-mode affects all buffers, not just the local one.
To Reproduce
Steps to reproduce the behavior:
Example:
Open Emacs emacs -Q, install topspace
Visit file1.el with (require 'topspace) in it.
Open other window C-x 3, visiting another file there, file2.el (doesn't have to exist)
Run M-x topspace-mode in one of the splits
scroll both window splits with the mouse
Expected behavior
The window and its buffer where you ran topspace-mode scrolls down; the other doesn't
Actual behavior
Both windows can scroll down with topspace
Screenshots
Edit: I now realize this variable is not buffer-local by default anyway, and also t after the require, so that's irrelevant. Screenshots left here to show that the mode is off in one of the buffers.
The window where topspace-mode is run:
The window that shouldn't have been affected still has topspace-active set to t:
Emacs version
GNU Emacs 28.0.90 (build 1, aarch64-apple-darwin21.2.0, NS appkit-2113.20 Version 12.1 (Build 21C52))
of 2021-12-28
topspace.el from master
The text was updated successfully, but these errors were encountered:
Thanks for catching this. For anyone wondering, the issue was related to the fact that advice-add is used to surround scrolling functions with custom topspace functions, and advice-add naturally is a global operation so even if one buffer had topspace-mode enabled and added advice-add then all other buffers would still call the custom topspace functions even if topspace wasn't enabled in those buffers.
I added some flags in the advice-add functions to guard from this. Also, I clarified that topspace shouldn't be enabled when topspace-mode is nil, even if topspace-active is non-nil.
Describe the bug
M-x topspace-mode
affects all buffers, not just the local one.To Reproduce
Steps to reproduce the behavior:
Example:
emacs -Q
, install topspacefile1.el
with(require 'topspace)
in it.C-x 3
, visiting another file there,file2.el
(doesn't have to exist)M-x topspace-mode
in one of the splitsExpected behavior
The window and its buffer where you ran
topspace-mode
scrolls down; the other doesn'tActual behavior
Both windows can scroll down with topspace
Screenshots
Edit: I now realize this variable is not buffer-local by default anyway, and also
t
after the require, so that's irrelevant. Screenshots left here to show that the mode is off in one of the buffers.The window where
![image](https://user-images.githubusercontent.com/59080/158766505-14bc3793-de6c-4fcf-9158-f4255e21426e.png)
topspace-mode
is run:The window that shouldn't have been affected still has
![image](https://user-images.githubusercontent.com/59080/158766323-13974ec5-996e-40b2-8969-8d804c42fe1f.png)
topspace-active
set tot
:Emacs version
GNU Emacs 28.0.90 (build 1, aarch64-apple-darwin21.2.0, NS appkit-2113.20 Version 12.1 (Build 21C52))
of 2021-12-28
topspace.el from master
The text was updated successfully, but these errors were encountered: