diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e49a636c98..d1223d07bb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-10 19:10 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/ideedit.prg + ! Alt+PageUp/Down now position the cursor to next line after + function ..() declaration line. + * contrib/hbide/ideshortcuts.prg + + Added: Alt+PageDown, Alt+PageUp macros. + User now can tune it according to his editing habits. + 2010-09-10 22:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.mk ! Adjustment to prev. Comment added. diff --git a/harbour/contrib/hbide/ideedit.prg b/harbour/contrib/hbide/ideedit.prg index 88673bbf4e..e9e9720e39 100644 --- a/harbour/contrib/hbide/ideedit.prg +++ b/harbour/contrib/hbide/ideedit.prg @@ -1377,6 +1377,7 @@ METHOD IdeEdit:toNextFunction() IF n < len( ::aTags ) IF ::find( ::aTags[ n+1, 8 ], QTextDocument_FindCaseSensitively ) ::qEdit:centerCursor() + ::down() ENDIF ENDIF ENDIF @@ -1391,6 +1392,7 @@ METHOD IdeEdit:toPreviousFunction() IF ( n := ::currentFunctionIndex() ) > 1 IF ::find( ::aTags[ n-1, 8 ], QTextDocument_FindCaseSensitively ) ::qEdit:centerCursor() + ::down() ENDIF ENDIF diff --git a/harbour/contrib/hbide/ideshortcuts.prg b/harbour/contrib/hbide/ideshortcuts.prg index d26109dfff..a862f24423 100644 --- a/harbour/contrib/hbide/ideshortcuts.prg +++ b/harbour/contrib/hbide/ideshortcuts.prg @@ -228,6 +228,9 @@ CLASS IdeShortcuts INHERIT IdeObject METHOD pageDown() METHOD find( cString, nPosFrom ) + METHOD toNextFunction() + METHOD toPrevFunction() + ENDCLASS /*----------------------------------------------------------------------*/ @@ -1233,6 +1236,12 @@ METHOD IdeShortcuts:toggleStatusBar() METHOD IdeShortcuts:execPlugin( cPlugin, ... ) RETURN hbide_execPlugin( cPlugin, ::oIde, ... ) /*----------------------------------------------------------------------*/ +METHOD IdeShortcuts:toNextFunction() + RETURN ::oEdit:toNextFunction() +/*----------------------------------------------------------------------*/ +METHOD IdeShortcuts:toPrevFunction() + RETURN ::oEdit:toPreviousFunction() +/*----------------------------------------------------------------------*/ // Public API Definitions /*----------------------------------------------------------------------*/ @@ -1273,6 +1282,12 @@ METHOD IdeShortcuts:loadMethods() aadd( ::aMethods, { 'gotoFunction()', ; 'gotoFunction()', ; 'Takes under-cursor word and attempts to open the source containing that function in a new tab.' } ) + aadd( ::aMethods, { 'toNextFunction()', ; + 'toNextFunction()', ; + 'Attempts to position the cursor at next available function body. Cursor is positioned centered in the editor.' } ) + aadd( ::aMethods, { 'toPrevFunction()', ; + 'toPrevFunction()', ; + 'Attempts to position the cursor at previous function body. Cursor is positioned centered in the editor.' } ) aadd( ::aMethods, { ' Navigation', ; '', ; @@ -1595,6 +1610,8 @@ METHOD IdeShortcuts:loadDftSCuts() aadd( b_, { "Clear Selection" , "F11" , "NO", "NO" , "YES", "", '::clearSelection()' , "" , "", "" } ) aadd( b_, { "Present Snippets", "K" , "NO", "YES", "NO" , "", '::presentSkeletons()' , "" , "", "" } ) aadd( b_, { "Goto Function" , "T" , "NO", "YES", "NO" , "", '::gotoFunction()' , "" , "", "" } ) + aadd( b_, { "Next Function" , "PageDown", "YES", "NO", "NO", "", '::toNextFunction()' , "" , "", "" } ) + aadd( b_, { "Prev Function" , "PageUp" , "YES", "NO", "NO" , "", '::toPrevFunction()' , "" , "", "" } ) ::aDftSCuts := b_ ENDIF