summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKosuke Asami <tfortress58@gmail.com>2013-07-17 18:35:33 +0900
committerKosuke Asami <tfortress58@gmail.com>2013-07-17 18:35:33 +0900
commitd0bf25e0cb81888a0e42a072b652a771db8ee4fc (patch)
tree6210e581ae9da0d2f33489188d1271c34867187f
parent7753e6bbb8e20223f057b8ee95b0fc87eacbf34a (diff)
downloadreply-d0bf25e0cb81888a0e42a072b652a771db8ee4fc.tar.gz
reply-d0bf25e0cb81888a0e42a072b652a771db8ee4fc.zip
Let Term::ReadLine::Perl5 output compatible with Term::ReadLine::Gnu
-rw-r--r--lib/Reply/Plugin/ReadLine.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm
index bea2712..18c944b 100644
--- a/lib/Reply/Plugin/ReadLine.pm
+++ b/lib/Reply/Plugin/ReadLine.pm
@@ -46,6 +46,11 @@ sub new {
$history
);
+ if ($self->{term}->ReadLine eq 'Term::ReadLine::Perl5') {
+ # output compatible with Term::ReadLine::Gnu
+ $readline::rl_scroll_nextline = 0;
+ }
+
if ($self->{term}->ReadLine eq ('Term::ReadLine::Gnu' or 'Term::ReadLine::Perl5')) {
$self->{term}->StifleHistory($opts{history_length})
if defined $opts{history_length} && $opts{history_length} >= 0;