hedgewars/uConsole.pas
changeset 53 0e27949850e3
parent 51 b6e3ae05857f
child 55 e09f7c952a40
--- a/hedgewars/uConsole.pas	Sun Jan 15 23:56:47 2006 +0000
+++ b/hedgewars/uConsole.pas	Thu Jan 19 21:12:20 2006 +0000
@@ -44,6 +44,7 @@
 procedure WriteLnToConsole(s: shortstring);
 procedure KeyPressConsole(Key: Longword);
 procedure ParseCommand(CmdStr: shortstring);
+function  GetLastConsoleLine: shortstring;
 
 implementation
 {$J+}
@@ -260,6 +261,12 @@
      end
 end;
 
+function GetLastConsoleLine: shortstring;
+begin
+if CurrLine = 0 then Result:= ConsoleLines[Pred(cLinesCount)]
+                else Result:= ConsoleLines[Pred(CurrLine)]
+end;
+
 {$INCLUDE CCHandlers.inc}
 
 initialization