aboutsummaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorMuhammad Bilal <mbilal@codesourcery.com>2013-11-06 11:42:52 +0500
committerMuhammad Bilal <mbilal@codesourcery.com>2013-11-06 12:24:23 +0500
commit840da61ad95439a10bce40329bf82e033ec4711b (patch)
tree4862688f3e6e6b52e06ea0461d41e55fe8e93288 /gdb/event-top.c
parent6dbb67982ced8b06deb512c0a357767f5ed486df (diff)
downloadgdb-840da61ad95439a10bce40329bf82e033ec4711b.zip
gdb-840da61ad95439a10bce40329bf82e033ec4711b.tar.gz
gdb-840da61ad95439a10bce40329bf82e033ec4711b.tar.bz2
2013-11-06 Muhammad Bilal <mbilal@codesourcery.com>
PR cli/16122 * top.c (command_line_input): Unify interactivity tests to use input_from_terminal_p. * event-top.c (command_line_handler): Likewise.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r--gdb/event-top.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 1f2e6fb..1290dd0 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -606,8 +606,7 @@ command_line_handler (char *rl)
*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