help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it ok to use (redisplay), or should this be left to the experts?


From: Stefan Monnier
Subject: Re: Is it ok to use (redisplay), or should this be left to the experts?
Date: Thu, 10 Jan 2019 17:02:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> The problem is that although full screen is activated before calculating the
> text width, (window-total-width) still reports the window width that existed
> before full screen was activated.

Adding a call to `redisplay` is fine to handle such cases.
This said, it may be insufficient (e.g. the window-manager may actually
execute the full-screen request asynchronously).

I think a better solution is to use window-size-change-functions in
order to detect when the window-total-width changes and only change the
text width at that point.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]