aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2020-12-21 13:52:03 +0100
committerHannes Domani <ssbssa@yahoo.de>2021-01-05 14:08:26 +0100
commit1b6d4bb2232ff9fd692a332a491b95b5f4052dfe (patch)
treeb054343d7833c17765333330567b6e94d594ea74 /gdb/tui
parentb5ff370e964a5a794a6b5791ca55ac103ebffe70 (diff)
downloadbinutils-1b6d4bb2232ff9fd692a332a491b95b5f4052dfe.zip
binutils-1b6d4bb2232ff9fd692a332a491b95b5f4052dfe.tar.gz
binutils-1b6d4bb2232ff9fd692a332a491b95b5f4052dfe.tar.bz2
Redraw both spaces between line numbers and source code
There a 2 spaces between the numbers and source code, but only one of them was redrawn. So if you increase the source window height, the second space keeps the character of the border rectangle. With this both spaces are redrawn, so the border rectangle character is overwritten. gdb/ChangeLog: 2021-01-05 Hannes Domani <ssbssa@yahoo.de> * tui/tui-source.c (tui_source_window::show_line_number): Redraw second space after line number.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-source.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 6254e8d..9750049 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -233,6 +233,8 @@ tui_source_window::show_line_number (int offset) const
{
int lineno = m_content[0].line_or_addr.u.line_no + offset;
char text[20];
- xsnprintf (text, sizeof (text), "%*d ", m_digits - 1, lineno);
+ /* To completely overwrite the previous border when the source window height
+ is increased, both spaces after the line number have to be redrawn. */
+ xsnprintf (text, sizeof (text), "%*d ", m_digits - 1, lineno);
waddstr (handle.get (), text);
}