diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-01-10 00:04:25 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-01-13 22:56:48 +0000 |
commit | 9a6d629ccf328e3f041c3fcb7e91f49a5d72d0fb (patch) | |
tree | b5be8391a6159d7b7fb3c9051c3d8368d10af05c /gdb/tui | |
parent | d8b2f9e3330ae76e33679c2628a6196542f329ca (diff) | |
download | gdb-9a6d629ccf328e3f041c3fcb7e91f49a5d72d0fb.zip gdb-9a6d629ccf328e3f041c3fcb7e91f49a5d72d0fb.tar.gz gdb-9a6d629ccf328e3f041c3fcb7e91f49a5d72d0fb.tar.bz2 |
gdb/tui: Place window titles in the center of the border
In tui-wingeneral.c:box_win () a comment suggest we should display
titles like this:
+-WINDOW TITLE GOES HERE-+
However, we actually display them like this:
+--WINDOW TITLE GOES HERE+
The former seems nicer to me, so that's what this commit does. Short
titles will appear as:
+-SHORT TITLE------------+
We previously didn't test the horizontal windows borders in the test
suite, however, I've updated things so that we do now check for the
'+-' and '-+' on the upper border, this will give us some protection.
gdb/ChangeLog:
* tui/tui-wingeneral.c (box_win): Position the title in the center
of the border.
gdb/testsuite/ChangeLog:
* lib/tuiterm.exp (Term::_check_box): Check some parts of the top
border.
Change-Id: Iead6910e3b4e68bdf6871f861f23d2efd699faf0
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 0a9fc52..4331f63 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -75,13 +75,13 @@ box_win (struct tui_win_info *win_info, int max_len = win_info->width - 2 - 2; if (win_info->title.size () <= max_len) - mvwaddstr (win, 0, 3, win_info->title.c_str ()); + mvwaddstr (win, 0, 2, win_info->title.c_str ()); else { std::string truncated = "..." + win_info->title.substr (win_info->title.size () - max_len + 3); - mvwaddstr (win, 0, 3, truncated.c_str ()); + mvwaddstr (win, 0, 2, truncated.c_str ()); } } wattroff (win, attrs); |