Bug 31355

Summary: Fix weird centering code
Product: gdb Reporter: Tom Tromey <tromey>
Component: tuiAssignee: Tom Tromey <tromey>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: HEAD   
Target Milestone: 15.1   
Host: Target:
Build: Last reconfirmed:

Description Tom Tromey 2024-02-08 19:19:26 UTC
Andrew Burgess pointed out that there is some weird
string-centering code in the TUI:

https://sourceware.org/pipermail/gdb-patches/2024-February/206449.html

These spots should be found & fixed.
Comment 1 Tom Tromey 2024-02-09 14:56:08 UTC
I have a patch.
Comment 2 Sourceware Commits 2024-03-02 01:45:09 UTC
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a6a3b67fa9052bba81ed91a38569c11ecb95baf1

commit a6a3b67fa9052bba81ed91a38569c11ecb95baf1
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Feb 9 16:22:53 2024 -0700

    Fix TUI text centering
    
    In a couple of spots, the TUI tries to center some text in the window.
    Andrew noticed that the calculation is done strangely and the text
    ends up somewhat to the left of center.
    
    This patch fixes the problem.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31355
Comment 3 Tom Tromey 2024-03-02 01:46:12 UTC
Fixed.