From b28db0d886570112c78ad67e8e9f4d71030ae4c4 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Tue, 25 Jan 2000 01:48:51 +0000 Subject: [PATCH] 2000-01-25 02:45 GMT+1 Antonio Linares --- harbour/ChangeLog | 5 +++++ harbour/source/debug/debugger.prg | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f077359a4d..e6a18f799f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2000-01-25 02:45 GMT+1 Antonio Linares + * source/debug/debugger.prg + * Support for up and down arrows on command window + Still needs some fine tunning. + 2000-01-24 20:15 GMT-5 David G. Holm * source/rtl/environ.c diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index 31560e6872..2885c3c9fe 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -179,16 +179,20 @@ METHOD EnableCommand() CLASS TDebugger local lExit := .f. local cCommand, cResult local bRestoreKeys := { || SetKey( K_SH_TAB, nil ), SetKey( K_TAB, nil ),; - SetKey( K_UP, nil ) } + SetKey( K_UP, nil ), SetKey( K_DOWN, nil ) } Set( _SET_SCOREBOARD, .f. ) SetKey( K_SH_TAB, { || lExit := .t., Eval( bRestoreKeys ),; __Keyboard( Chr( K_ESC ) + Chr( K_SH_TAB ) ) } ) SetKey( K_TAB, { || lExit := .t., Eval( bRestoreKeys ),; __Keyboard( Chr( K_ESC ) + Chr( K_TAB ) ) } ) - SetKey( K_UP, { || If( ::nCommand > 0, ( GetList[ 1 ]:VarPut( ::aLastCommands[ ; - ::nCommand ] ), GetList[ 1 ]:Display(),; + SetKey( K_UP, { || If( ::nCommand > 0, ( GetList[ 1 ]:Buffer := ::aLastCommands[ ; + ::nCommand ], GetList[ 1 ]:Pos := 1, GetList[ 1 ]:Display(),; If( ::nCommand > 1, ::nCommand--, nil ) ), nil ) } ) + SetKey( K_DOWN, { || If( ::nCommand <= Len( ::aLastCommands ),; + ( GetList[ 1 ]:Buffer := ::aLastCommands[ ; + ::nCommand ], GetList[ 1 ]:Pos := 1, GetList[ 1 ]:Display(),; + If( ::nCommand < Len( ::aLastCommands ), ::nCommand++, nil ) ), nil ) } ) while ! lExit @ ::oWndCommand:nBottom - 1, ::oWndCommand:nLeft + 1 SAY "> " ;