Use wclrtoeol in tui_show_source_line
This changes tui_show_source_line to use wclrtoeol rather than manually emitting a sequence of spaces. gdb/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_show_source_line): Use wclrtoeol.
This commit is contained in:
parent
1d1d0bf76f
commit
4a3045920b
2 changed files with 5 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2018-12-28 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-winsource.c (tui_show_source_line): Use wclrtoeol.
|
||||||
|
|
||||||
2018-12-28 Tom Tromey <tom@tromey.com>
|
2018-12-28 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
PR tui/14126:
|
PR tui/14126:
|
||||||
|
|
|
@ -272,7 +272,6 @@ static void
|
||||||
tui_show_source_line (struct tui_win_info *win_info, int lineno)
|
tui_show_source_line (struct tui_win_info *win_info, int lineno)
|
||||||
{
|
{
|
||||||
struct tui_win_element *line;
|
struct tui_win_element *line;
|
||||||
int x;
|
|
||||||
|
|
||||||
line = win_info->generic.content[lineno - 1];
|
line = win_info->generic.content[lineno - 1];
|
||||||
if (line->which_element.source.is_exec_point)
|
if (line->which_element.source.is_exec_point)
|
||||||
|
@ -284,12 +283,7 @@ tui_show_source_line (struct tui_win_info *win_info, int lineno)
|
||||||
wattroff (win_info->generic.handle, A_STANDOUT);
|
wattroff (win_info->generic.handle, A_STANDOUT);
|
||||||
|
|
||||||
/* Clear to end of line but stop before the border. */
|
/* Clear to end of line but stop before the border. */
|
||||||
x = getcurx (win_info->generic.handle);
|
wclrtoeol (win_info->generic.handle);
|
||||||
while (x + 1 < win_info->generic.width)
|
|
||||||
{
|
|
||||||
waddch (win_info->generic.handle, ' ');
|
|
||||||
x = getcurx (win_info->generic.handle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue