From 798e1c302af509c31839c5c3b50c058b61206ee7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 16 Mar 2019 14:13:43 +0200 Subject: [PATCH] Revert "Use wclrtoeol in tui_show_source_line" gdb/ChangeLog: 2019-03-16 Eli Zaretskii * tui/tui-winsource.c (tui_show_source_line): Revert "Use wclrtoeol in tui_show_source_line". This reverts changes made in commit 4a3045920bbe4e50a0f4920b0fdc4e88ef23015c. --- gdb/ChangeLog | 6 ++++++ gdb/tui/tui-winsource.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7eddaef886..7b70a8c277 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-03-16 Eli Zaretskii + + * tui/tui-winsource.c (tui_show_source_line): Revert "Use + wclrtoeol in tui_show_source_line". This reverts changes made in + commit 4a3045920bbe4e50a0f4920b0fdc4e88ef23015c. + 2019-03-15 Tom Tromey * symtab.h (struct minimal_symbol): Derive from diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 7fd460bde3..a451d13f44 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -273,6 +273,7 @@ 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) @@ -285,7 +286,12 @@ 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. */ - wclrtoeol (win_info->generic.handle); + x = getcurx (win_info->generic.handle); + while (x + 1 < win_info->generic.width) + { + waddch (win_info->generic.handle, ' '); + x = getcurx (win_info->generic.handle); + } } void -- 2.34.1