diff options
author | Tom Tromey <tom@tromey.com> | 2018-10-09 14:16:07 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-12-28 12:49:53 -0700 |
commit | 4a3045920bbe4e50a0f4920b0fdc4e88ef23015c (patch) | |
tree | e71cdfd2cb46cadab50a5389037c16a42e7c9661 | |
parent | 1d1d0bf76f3bc3056a1456e53c066f40ca4d0837 (diff) | |
download | gdb-4a3045920bbe4e50a0f4920b0fdc4e88ef23015c.zip gdb-4a3045920bbe4e50a0f4920b0fdc4e88ef23015c.tar.gz gdb-4a3045920bbe4e50a0f4920b0fdc4e88ef23015c.tar.bz2 |
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.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5d61d27..449cf84 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 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> + PR tui/14126: * tui/tui.c (tui_enable): Call start_color and use_default_colors. diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 49eb4ce..0bf7438 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -272,7 +272,6 @@ static void tui_show_source_line (struct tui_win_info *win_info, int lineno) { struct tui_win_element *line; - int x; line = win_info->generic.content[lineno - 1]; 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); /* Clear to end of line but stop before the border. */ - x = getcurx (win_info->generic.handle); - while (x + 1 < win_info->generic.width) - { - waddch (win_info->generic.handle, ' '); - x = getcurx (win_info->generic.handle); - } + wclrtoeol (win_info->generic.handle); } void |