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

Please redraw when window size changes #28

Open
sten0 opened this issue Dec 8, 2019 · 5 comments
Open

Please redraw when window size changes #28

sten0 opened this issue Dec 8, 2019 · 5 comments

Comments

@sten0
Copy link

sten0 commented Dec 8, 2019

Hi,

I started testing this package and noticed that it doesn't redraw when a window is resized, which leads to a horizontal ruler that is either too long or two short. What do you think about triggering a redraw using window-size-change-functions or window-configuration-change-hook?

Best,
Nicholas

@sten0
Copy link
Author

sten0 commented Dec 8, 2019

P.S. I've read that window-configuration-change-hook might be necessary on older versions of Emacs, and I'm not sure which version introduced window-size-change-functions.

@purcell
Copy link
Owner

purcell commented Dec 9, 2019

The code has been doing this for a long time already:

(dolist (hook '(window-configuration-change-hook
window-size-change-functions
after-setting-font-hook
display-line-numbers-mode-hook))

Please could you provide steps to reproduce, including your Emacs version and platform?

@sten0
Copy link
Author

sten0 commented Dec 9, 2019 via email

@purcell
Copy link
Owner

purcell commented Dec 24, 2019

So the nature of the bug is limited to case where multiple windows display the same buffer.

Aha. Yes, this is a "can't easily fix" issue, unfortunately: page-break-lines uses display tables to efficiently rewrite the page break char into a horizontal line, and display tables are per-buffer. If you have the same buffer in two windows with differing widths, there is no single display table that will make the line look correct in both.

In all other regards, display tables are an excellent and efficient method for implementing this package, so I'm not keen to change the code just for this relative minority case.

@sten0
Copy link
Author

sten0 commented Dec 24, 2019 via email

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

No branches or pull requests

2 participants