tui-winsource: Allocate for actual lines only
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Wed, 9 Nov 2016 12:02:13 +0000 (13:02 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Wed, 9 Nov 2016 12:02:13 +0000 (13:02 +0100)
commit7bc2c8b83ea82b4315c67e7658af815aed062e73
treef2c8720d610cb3e2f517a50c3f1f40663ca36761
parentf5396833d35a257902409493a63f777dcd771868
tui-winsource: Allocate for actual lines only

The logic for allocating a TUI source window's content buffer allocates
two more lines than needed, because it does not reduce the window height
by the highlight box's overhead.  However, it does reduce the line width
accordingly.  This patch makes the height and width calculation
consistent and improves the comment.

gdb/ChangeLog:

* tui/tui-winsource.c (tui_alloc_source_buffer): Subtract
highlight box's overhead when calculating the content height.
gdb/ChangeLog
gdb/tui/tui-winsource.c