URL: <https://savannah.gnu.org/bugs/?68263>
Summary: Hardstatus color problem when centering with left
and right padding
Group: GNU Screen
Submitter: jimp
Submitted: Wed 22 Apr 2026 01:38:25 AM UTC
Category: User Interface
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Unlocked
Release: 5.0.1
Fixed Release: None
Planned Release: None
Work Required: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 22 Apr 2026 01:38:25 AM UTC By: Jim P <jimp>
When using colors in a hardstatus line there is a problem rendering the color
of the last window in the list if using left and right %= padding to center
the window list. No matter how many windows are open, the problem is always
present when the last window in the list is active.
This might be a regression of bug #32339 which seems similar.
I'm using the following hardstatus I converted to Screen 5.x style:
hardstatus alwayslastline '%{= 2;0}[%{=b 2;0}%H%{-}][%{-}%=%{= 7;0}%-Lw%{=b
1;0}(%{-}%{=b 7;0}%n%f %t%? (%u)%?%{-}%{=b 1;0})%{-}%+Lw%=%{= 2;0}]%{=b
6;0}[%m/%d/%y %C %A]'
With that status line, the active window title has no color until I make a
second window, and then the color only shows when I have the first window
active.
Here is a smaller hardstatus that reproduces the problem:
hardstatus alwayslastline 'Left%=%-Lw%{7;4}%n%f %t%{-}%+Lw%=Right'
See the attached image for how that example looks with one window, two windows
with window 0 and then 1 active, and then with three windows and window 0, 1,
then 2 active. You can see that the background color is shifted far to the
left of where the text is placed.
The problem only happens with both %= pad escapes present to center the list.
If I remove either of the %= padding escapes, the color renders exactly as
expected flushed right or left.
_______________________________________________________
File Attachments:
Example of the color rendering problem
Name: screen_hardstatus_color_bug.png Size: 23KiB
<https://file.savannah.gnu.org/file/screen_hardstatus_color_bug.png?file_id=58492>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-f290f6b25beb8cb99bbe243a6cd2c5fef79ffcde.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68263>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
