Hi NRK,
On Sun, Oct 09, 2022 at 11:42:58AM +0600, NRK wrote:
> > @@ -48,6 +48,14 @@ sigwinch(int sig)
> > static void
> > exit_handler(void)
> > {
> > + char *title = getenv("TERM");
> > +
> > + /* reset terminal's window name */
> > + if (strncmp(title, "screen", 6) == 0)
> > + printf("\033k%s\033\\", title);
>
> I'd personally test for NULL before passing it to strncmp() just in
> case.
Good catch. I fixed that.
> > - if (strcmp(getenv("TERM"), "screen") == 0)
> > + if (strncmp(getenv("TERM"), "screen", 6) == 0)
> > printf("\033k%s\033\\", title);
>
> Same here.
Same here.
Thanks,
Jan