diff options
author | Tom Tromey <tom@tromey.com> | 2024-02-09 16:22:53 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-03-01 18:15:35 -0700 |
commit | a6a3b67fa9052bba81ed91a38569c11ecb95baf1 (patch) | |
tree | 6f7ee22e31ef7887d292c0408cddf7b868ad1de2 /gdb/tui/tui-data.h | |
parent | 668183c244d54cb69ce7f292a208c8eca60ad625 (diff) | |
download | gdb-a6a3b67fa9052bba81ed91a38569c11ecb95baf1.zip gdb-a6a3b67fa9052bba81ed91a38569c11ecb95baf1.tar.gz gdb-a6a3b67fa9052bba81ed91a38569c11ecb95baf1.tar.bz2 |
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
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r-- | gdb/tui/tui-data.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 90ab01f..ce9c1a8 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -167,9 +167,9 @@ public: const std::string &title () const { return m_title; } - /* Display string STR in the window at position (Y,X), abbreviated if - necessary. */ - void display_string (int y, int x, const char *str) const; + /* Clear the window, maybe draw the boarder, and then display string + STR centered in the window, abbreviated if necessary. */ + void center_string (const char *str); /* Display string STR in the window at the current cursor position, abbreviated if necessary. */ |