summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-21 02:54:42 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-21 02:54:42 -0500
commit44d5e9db7d6bcd5f05218950e110ba79967244d2 (patch)
tree93414e011af86af190bc65497fe3bc0783fa30d5 /bin
parent56302d4f6d5af6173c12a4c0108b6635f13e87da (diff)
downloadlanguage-teco-44d5e9db7d6bcd5f05218950e110ba79967244d2.tar.gz
language-teco-44d5e9db7d6bcd5f05218950e110ba79967244d2.zip
ReadKey fails on undef, not false
Diffstat (limited to 'bin')
-rw-r--r--bin/te5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/te b/bin/te
index aca502d..0e3afcd 100644
--- a/bin/te
+++ b/bin/te
@@ -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 '$';