Subject: bug#46557: 28.0.50; Visual glitches in text mode when tab-bar visibility is altered at load time

From: Juri Linkov <[email-masked]>
Date: Sun, 09 May 2021 20:37:56 +0300

> The following recipe creates a broken visual appearance of emacs in text
> mode, at least on GNU/Linux:
>
> 1) Create a test.el file with these lines:
>
> (set-frame-parameter nil 'tab-bar-lines 0)
> (set-frame-parameter nil 'tab-bar-lines 1)
> (set-frame-parameter nil 'tab-bar-lines 0)

This bug report can't be closed, because it seems
this problem is related to https://debbugs.gnu.org/46827#153
where setting tab-bar-lines to 1 changes tab-bar-lines to 2.
Reproducible test case:

(progn
  (set-frame-parameter nil 'tab-bar-lines 1)
  (let ((lines (frame-parameter nil 'tab-bar-lines)))
    (sit-for 0)
    (list lines (frame-parameter nil 'tab-bar-lines))))

returns (1 2)