2010-04-25 01:44 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
! Fix to handle space key when code completion popup is visible.
* contrib/hbide/ideeditor.prg
! Corresponding fix to above one.
* contrib/hbide/idethemes.prg
+ Added more Harbour keywords to be distinguished in color.
This commit is contained in:
@@ -17,6 +17,16 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-04-25 01:44 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
|
||||
! Fix to handle space key when code completion popup is visible.
|
||||
|
||||
* contrib/hbide/ideeditor.prg
|
||||
! Corresponding fix to above one.
|
||||
|
||||
* contrib/hbide/idethemes.prg
|
||||
+ Added more Harbour keywords to be distinguished in color.
|
||||
|
||||
2010-04-25 01:32 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbxbp/xbp3state.prg
|
||||
* contrib/hbxbp/xbpappevent.prg
|
||||
|
||||
@@ -1664,7 +1664,7 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 )
|
||||
EXIT
|
||||
|
||||
CASE cursorPositionChanged
|
||||
// HB_TRACE( HB_TR_ALWAYS, "cursorPositionChanged()", ::nProtoLine, ::nProtoCol, ::isSuspended, ::getLineNo(), ::getColumnNo(), ::cProto )
|
||||
//HB_TRACE( HB_TR_ALWAYS, "cursorPositionChanged()", ::nProtoLine, ::nProtoCol, ::isSuspended, ::getLineNo(), ::getColumnNo(), ::cProto )
|
||||
::oEditor:dispEditInfo( qEdit )
|
||||
::handlePreviousWord( ::lUpdatePrevWord )
|
||||
::handleCurrentIndent()
|
||||
@@ -1806,7 +1806,7 @@ METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 )
|
||||
::moveLine( -1 )
|
||||
RETURN .t.
|
||||
ENDIF
|
||||
EXIT
|
||||
EXIT
|
||||
CASE Qt_Key_Down
|
||||
IF lCtrl .AND. lShift
|
||||
::moveLine( 1 )
|
||||
@@ -1857,6 +1857,9 @@ METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 )
|
||||
::lCopyWhenDblClicked := .f. /* not intuitive */
|
||||
::clickFuncHelp()
|
||||
|
||||
ELSEIF p == 21001
|
||||
::handlePreviousWord( .t. )
|
||||
|
||||
ELSEIF p == QEvent_Paint
|
||||
// ::oIde:testPainter( p1 )
|
||||
|
||||
@@ -2187,6 +2190,8 @@ METHOD IdeEdit:insertText( cText )
|
||||
METHOD IdeEdit:handlePreviousWord( lUpdatePrevWord )
|
||||
LOCAL qCursor, qTextBlock, cText, cWord, nB, nL, qEdit, lPrevOnly, nCol, nSpace, nSpaces, nOff
|
||||
|
||||
* HB_TRACE( HB_TR_ALWAYS, "IdeEdit:handlePreviousWord( lUpdatePrevWord )", lUpdatePrevWord )
|
||||
|
||||
IF ! lUpdatePrevWord
|
||||
RETURN Self
|
||||
ENDIF
|
||||
@@ -2362,7 +2367,7 @@ METHOD IdeEdit:resumePrototype()
|
||||
IF !empty( ::qEdit )
|
||||
IF ::getLineNo() == ::nProtoLine .AND. ::getColumnNo() >= ::nProtoCol
|
||||
::qEdit:hbShowPrototype( ::cProto )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
@@ -2565,7 +2570,9 @@ FUNCTION hbide_isHarbourKeyword( cWord )
|
||||
'recover' => NIL,;
|
||||
'hb_symbol_unused' => NIL,;
|
||||
'error' => NIL,;
|
||||
'handler' => NIL }
|
||||
'handler' => NIL,;
|
||||
'.or.' => NIL,;
|
||||
'.and.' => NIL }
|
||||
|
||||
RETURN Lower( cWord ) $ s_b_
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ METHOD IdeThemes:create( oIde, cIniFile )
|
||||
'class','endclass','method','data','var','destructor','inline','assign','access',;
|
||||
'inherit','init','create','virtual','message',;
|
||||
'begin','sequence','try','catch','always','recover','hb_symbol_unused', ;
|
||||
'error','handler' }
|
||||
'error','handler','setget','.and.' }
|
||||
s := ""; aeval( b_, {|e| s += iif( empty( s ), "", "|" ) + "\b" + upper( e ) + "\b|\b" + e + "\b" } )
|
||||
aadd( ::aPatterns, { "HarbourKeywords" , s } )
|
||||
|
||||
|
||||
@@ -190,6 +190,14 @@ void HBQPlainTextEdit::keyPressEvent( QKeyEvent * event )
|
||||
case Qt::Key_Backtab:
|
||||
event->ignore();
|
||||
return; // let the completer do default behavior
|
||||
case Qt::Key_Space:
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, 21001 );
|
||||
hb_vmEvalBlockV( block, 1, p1 );
|
||||
hb_itemRelease( p1 );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -210,7 +218,7 @@ void HBQPlainTextEdit::keyPressEvent( QKeyEvent * event )
|
||||
if( ( ctrlOrShift && event->text().isEmpty() ) )
|
||||
return;
|
||||
|
||||
static QString eow( "~!@#$%^&*()+{}|:\"<>?,./;'[]\\-=" ); /* end of word */
|
||||
static QString eow( " ~!@#$%^&*()+{}|:\"<>?,./;'[]\\-=" ); /* end of word */
|
||||
bool hasModifier = ( event->modifiers() != Qt::NoModifier ) && !ctrlOrShift;
|
||||
QString completionPrefix = hbTextUnderCursor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user