properly reset ReadLine's knowledge of handles after pager
authorHiroo Hayashi <hiroo.hayashi@computer.org>
Mon, 7 Apr 2014 14:33:17 +0000 (10:33 -0400)
committerRicardo Signes <rjbs@cpan.org>
Mon, 7 Apr 2014 14:33:17 +0000 (10:33 -0400)
[perl #121456]

lib/perl5db.pl

index c1d6752..ae04a9a 100644 (file)
@@ -2419,6 +2419,9 @@ sub _DB__at_end_of_every_command {
             open( OUT, ">&SAVEOUT" ) || _db_warn("Can't restore DB::OUT");
         }
 
+        # Let Readline know about the new filehandles.
+        reset_IN_OUT( \*IN, \*OUT );
+
         # Close filehandle pager was using, restore the normal one
         # if necessary,
         close(SAVEOUT);