From: Tom Tromey Date: Tue, 2 Jul 2019 23:31:44 +0000 (-0600) Subject: Fix an error in parse_scrolling_args X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca5af91ed271a12200bb40ccfaaede4baef6f5fe;p=binutils-gdb.git Fix an error in parse_scrolling_args parse_scrolling_args combines two errors into one message, which also happens to end with a newline. This separates the errors and fixes the message. gdb/ChangeLog 2019-07-17 Tom Tromey * tui/tui-win.c (parse_scrolling_args): Throw separate errors. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 77a9f9e86eb..aff8c75a0a9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-07-17 Tom Tromey + + * tui/tui-win.c (parse_scrolling_args): Throw separate errors. + 2019-07-17 Tom Tromey * tui/tui-winsource.h (struct tui_exec_info_window) diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 1e02c42dbd1..db4dc1088a6 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1391,10 +1391,10 @@ parse_scrolling_args (const char *arg, *win_to_scroll = tui_partial_win_by_name (wname); - if (*win_to_scroll == NULL - || !(*win_to_scroll)->is_visible) - error (_("Invalid window specified. \n\ -The window name specified must be valid and visible.\n")); + if (*win_to_scroll == NULL) + error (_("Unrecognized window `%s'"), wname); + if (!(*win_to_scroll)->is_visible) + error (_("Window is not visible")); else if (*win_to_scroll == TUI_CMD_WIN) *win_to_scroll = tui_source_windows ()[0]; }