diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2d6032d3d5..840291dcf6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,22 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-19 16:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/ideedit.prg + * contrib/hbide/ideeditor.prg + ! Fixed: syntax highlighting on split window. + This is activated when used clicks in the window. + + ! Fixed: icons on the editing area left-toolbar + were rendered hidden once a split window was closed. + + * contrib/hbide/idethemes.prg + ! Changed: .AND. .OR. IN as keywords only instead of operators. + This facilitates better visual experience in the editor. + + * contrib/hbqt/qtgui/hbqt_hbqsyntaxhighlighter.cpp + + Added: consider a source line as a comment if starts with "*". + 2011-05-20 00:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbide/idesaveload.prg * turned off MDI mode by default @@ -49,7 +65,7 @@ * contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp ! Fixed: regression on optimization on syantax highlighting. Split windows now behave properly. - ; TOFIX: syntax highlighting in split windows. + ; FIXED: syntax highlighting in split windows. 2011-05-19 19:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/arc4.c diff --git a/harbour/contrib/hbide/ideedit.prg b/harbour/contrib/hbide/ideedit.prg index 8c577f3850..cd84ff2f66 100644 --- a/harbour/contrib/hbide/ideedit.prg +++ b/harbour/contrib/hbide/ideedit.prg @@ -365,7 +365,6 @@ METHOD IdeEdit:setFont() METHOD IdeEdit:destroy() - ::oUpDn:oUI:setParent( ::oDlg:oWidget ) IF Self == ::oEditor:oEdit ::oSourceThumbnailDock:oWidget:hide() ENDIF @@ -467,7 +466,6 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 ) EXIT CASE "Close Split Window" IF n > 0 /* 1 == Main Edit */ - ::oUpDn:oUI:setParent( ::oEditor:oEdit:qEdit ) oo := ::oEditor:aEdits[ n ] hb_adel( ::oEditor:aEdits, n, .t. ) oo:destroy( .f. ) @@ -521,6 +519,7 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 ) CASE selectionChanged //HB_TRACE( HB_TR_DEBUG, "selectionChanged()" ) + ::oEditor:qCqEdit := qEdit ::oEditor:qCoEdit := oEdit @@ -542,6 +541,12 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 ) ::oUpDn:show() ::unHighlight() + IF hb_isObject( ::oEditor:qHiliter ) + ::oEditor:qHiliter:hbSetEditor( qEdit ) + qEdit:hbSetHighlighter( ::oEditor:qHiliter ) + qEdit:hbHighlightPage() + ENDIF + EXIT CASE cursorPositionChanged diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index 3aa3c38a5a..d76d9944a1 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -1427,6 +1427,11 @@ METHOD IdeEditor:split( nOrient, oEditP ) ::relay( oEdit ) + IF hb_isObject( ::qHiliter ) + oEdit:qEdit:hbSetHighLighter( ::qHiliter ) + oEdit:qEdit:hbHighlightPage() + ENDIF + RETURN Self /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idethemes.prg b/harbour/contrib/hbide/idethemes.prg index fca2b96140..d611b5306b 100644 --- a/harbour/contrib/hbide/idethemes.prg +++ b/harbour/contrib/hbide/idethemes.prg @@ -221,7 +221,7 @@ METHOD IdeThemes:create( oIde, cThemesFile ) 'do','while','exit','enddo','loop',; 'for','each','next','step','to','in',; 'with','object','endwith','request',; - 'nil','and','or','self',; + 'nil','and','or','in','self',; 'class','endclass','method','data','var','destructor','inline','assign','access',; 'inherit','init','create','virtual','message', 'from', 'setget',; 'begin','sequence','try','catch','always','recover','hb_symbol_unused', ; @@ -237,7 +237,8 @@ METHOD IdeThemes:create( oIde, cThemesFile ) s := ""; aeval( b_, {|e| s += iif( empty( s ), "", "|" ) + "\b" + e + "\b" } ) aadd( ::aPatterns, { "CLanguageKeywords" , s , .t. } ) - s := "\:\=|\:|\+|\-|\\|\*|\ IN\ |\ in\ |\=|\>|\<|\^|\%|\$|\&|\@|\.or\.|\.and\.|\.OR\.|\.AND\.|\!" + //s := "\:\=|\:|\+|\-|\\|\*|\ IN\ |\ in\ |\=|\>|\<|\^|\%|\$|\&|\@|\.or\.|\.and\.|\.OR\.|\.AND\.|\!" + s := "\:\=|\:|\+|\-|\\|\*|\=|\>|\<|\^|\%|\$|\&|\@|\!" aadd( ::aPatterns, { "Operators" , s , .f. } ) aadd( ::aPatterns, { "NumericalConstants", "\b[0-9.]+\b" , .f. } ) diff --git a/harbour/contrib/hbqt/qtgui/hbqt_hbqsyntaxhighlighter.cpp b/harbour/contrib/hbqt/qtgui/hbqt_hbqsyntaxhighlighter.cpp index 1e6a719924..bd9c5f918b 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_hbqsyntaxhighlighter.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_hbqsyntaxhighlighter.cpp @@ -94,7 +94,7 @@ HBQSyntaxHighlighter::HBQSyntaxHighlighter( QTextDocument * parent ) commentStartExpression = QRegExp( "/\\*" ); commentEndExpression = QRegExp( "\\*/" ); - commentSingleLine = QRegExp( "//[^\n]*" ); + commentSingleLine = QRegExp( "//[^\n]*|^[ ]*\\*[^\n]*" ); patternQuotation = QRegExp( "\"[^\"]+\"|\'[^\']+\'" );