Re: [dev] [st] st+vifm+nvim or st+mutt+nvim wrong terminal geometry

From: Markus Wichmann <nullplan_AT_gmx.net>
Date: Wed, 25 Jan 2023 17:34:08 +0100

On Wed, Jan 25, 2023 at 04:35:39PM +0100, German Hammerl wrote:
> Hi there,
>
> I am new to this mailing list and have problems to search the
> archives, therefore I dare to ask, even though this question may
> already have been asked and answered before:
>
> In vanilla dwm, by, e.g., starting mutt or vifm via
>
> st -e mutt
> st -e vifm
>
> I receive a fullscreen terminal window correctly displaying
> the content of mutt or vifm, but if I then
> open a mail in mutt or a file in vifm invoking nvim,
> the terminal geometry in nvim is acually that size
> of a single floating window of st, resulting in a scrambeled display
> of the mail or file in nvim. Ctrl+L will not fix the display, but
> only a switch to 'monocl' and back to 'tile'.
>
> Is there any way to correct the terminal geometry after
> opening the st terminal?
>
> Any help would be appreciated.
>
> Thanks in advance
> German
>

My guess: Timing problem. dwm resizes st during startup, and then st
changes its window size, and either of the affected applications does
not update the window size when this happens.

I would run mutt or vifm under strace to see if they get a SIGWINCH, and
if they react to it by re-reading the window size. If not, they may have
a problem if SIGWINCH occurs too early (they ought to register the
SIGWINCH handler first and read the window size second, not the other
way around).

HTH,
Markus
Received on Wed Jan 25 2023 - 17:34:08 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 25 2023 - 18:48:50 CET