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.
This commit is contained in:
parent
b5ff370e96
commit
1b6d4bb223
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2021-01-05 Hannes Domani <ssbssa@yahoo.de>
|
||||
|
||||
* tui/tui-source.c (tui_source_window::show_line_number):
|
||||
Redraw second space after line number.
|
||||
|
||||
2021-01-05 Hannes Domani <ssbssa@yahoo.de>
|
||||
|
||||
PR tui/26927
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue