Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid touching inactive frames #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amosbird
Copy link

This causes unexpected frame switches in terminal emacs when frame size changes.

This causes unexpected frame switches in terminal emacs when frame size changes.
@purcell
Copy link
Owner

purcell commented Sep 25, 2018

Thanks for submitting this. The change itself feels like bit of a hack, but perhaps just because I don't understand what's actually going wrong. If the frame size changes, the hook should only operate on the current frame. Is there a way to reproduce the issue you're seeing?

@amosbird
Copy link
Author

the hook should only operate on the current frame
You mean these hooks?

(dolist (hook '(window-configuration-change-hook
                window-size-change-functions
                after-setting-font-hook
                display-line-numbers-mode-hook))
  (add-hook hook 'page-break-lines--update-display-tables))

Well I'm not sure if it only affects current frame but along with https://github.com/amosbird/realign-mode.el it's reproducible. Just enable both mode in emacs -nw -Q and spawn a bunch of frames visiting different files. Also make sure some of them have ^L. Then change terminal size a bunch of times.

@purcell
Copy link
Owner

purcell commented Sep 26, 2018

Well I'm not sure if it only affects current frame but along with https://github.com/amosbird/realign-mode.el it's reproducible.

Strange, because that code looks reasonable too, and it's not obvious what's happening or why the proposed fix would consequently be the correct one. This would require some debugging to understand what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants