added a clrtoeol and a ^A
[spider.git] / perl / console.pl
index 02a2e476831ef0567d21dc7c384c8d27a52c84bb..429f5d36245be86a35880a477356a2c6f1ec6f19 100755 (executable)
@@ -93,6 +93,7 @@ sub rec_stdin
                                shift @history if @history > $maxhist;
                                $histpos = @history;
                                $bot->move(0,0);
+                               $bot->clrtoeol();
                                $bot->addstr(substr($inbuf, 0, COLS));
                        }
                
@@ -129,7 +130,7 @@ sub rec_stdin
                        } else {
                                beep();
                        }
-               } elsif ($r eq KEY_HOME) {
+               } elsif ($r eq KEY_HOME || $r eq "\001") {
                        $pos = 0;
                } elsif ($r eq KEY_BACKSPACE || $r eq "\010") {
                        if ($pos > 0) {