gdb/tui: Place window titles in the center of the border
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 10 Jan 2020 00:04:25 +0000 (00:04 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 13 Jan 2020 22:56:48 +0000 (22:56 +0000)
commit9a6d629ccf328e3f041c3fcb7e91f49a5d72d0fb
treeb5be8391a6159d7b7fb3c9051c3d8368d10af05c
parentd8b2f9e3330ae76e33679c2628a6196542f329ca
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
gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/lib/tuiterm.exp
gdb/tui/tui-wingeneral.c