aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/top.c b/gdb/top.c
index c473d8c..7d928e1 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1061,8 +1061,7 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
*p = 0;
/* Add line to history if appropriate. */
- if (instream == stdin
- && ISATTY (stdin) && *linebuffer)
+ if (*linebuffer && input_from_terminal_p ())
add_history (linebuffer);
/* Note: lines consisting solely of comments are added to the command