diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-21 02:54:42 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-21 02:54:42 -0500 |
commit | 44d5e9db7d6bcd5f05218950e110ba79967244d2 (patch) | |
tree | 93414e011af86af190bc65497fe3bc0783fa30d5 | |
parent | 56302d4f6d5af6173c12a4c0108b6635f13e87da (diff) | |
download | language-teco-44d5e9db7d6bcd5f05218950e110ba79967244d2.tar.gz language-teco-44d5e9db7d6bcd5f05218950e110ba79967244d2.zip |
ReadKey fails on undef, not false
-rw-r--r-- | bin/te | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -22,7 +22,10 @@ sub command_as_string { my $command = ''; COMMAND: while (1) { print '*'; - KEY: while (my $c = ReadKey 0) { + KEY: while (1) { + my $c = ReadKey 0; + last KEY unless defined $c; + my $pc = substr($command, -1); if ($c eq "\e") { print '$'; |