develooper Front page | perl.perl5.porters | Postings from July 2003

Re: [perl #23075] AutoReply: Wrong linewrap in Term::ReadLine::Perl with EDITOR=vi

From:
Peter J. Holzer
Date:
July 21, 2003 12:14
Subject:
Re: [perl #23075] AutoReply: Wrong linewrap in Term::ReadLine::Perl with EDITOR=vi
Message ID:
20030721135940.GB4864@teal.hjp.at
On 2003-07-21 13:51:21 -0000, perlbug-followup@perl.org wrote:
> Fix: Move the 
> 
>     print $term_OUT "\r\n";
> 
> from F_AcceptLine  to the end of readline, just before or after the call
> to &ResetTTY;

Here is a patch:


--- /usr/lib/perl5/site_perl/5.6.1/Term/ReadLine/readline.pm	Sat May 25 03:21:12 2002
+++ /usr/local/lib/perl5/site_perl/5.8.0/Term/ReadLine/readline.pm	Mon Jul 21 15:57:05 2003
@@ -1489,6 +1489,7 @@
 	&redisplay();
 	$LastCommandKilledText = $ThisCommandKilledText;
     }
+    print $term_OUT "\r\n";
 
     undef @undo; ## Release the memory.
     &ResetTTY;   ## Restore the tty state.
@@ -1879,7 +1880,6 @@
     &add_line_to_history;
     $AcceptLine = $line;
     local $\ = '';
-    print $term_OUT "\r\n";
 }
 
 sub add_line_to_history


-- 
   _  | Peter J. Holzer    | Geht durch die Magmaschleuse, dann erfahrt
|_|_) | Sysadmin WSR       | ihr, warum 23 nicht 42 ist. Nur 30 ist
| |   | hjp@hjp.at         | austauschbar.
__/   | http://www.hjp.at/ |    -- PR 473



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About