ThxAdded functions : GOSCI_DecFoldLevel(id) and GOSCI_IncFoldLevel(id) to be used within a user-defined line styling function only.
The custom styling function works great

The code is simplier but it runs probably a little bit slower.
ThxAdded functions : GOSCI_DecFoldLevel(id) and GOSCI_IncFoldLevel(id) to be used within a user-defined line styling function only.
REGEXs are optimizedMistrel wrote:I thought regular expressions were supposed to be fast?
Code: Select all
CreateStylingRules("PB")
AddStylingRule(#STYLE_DEFAULT, "[ \t]+")
If AddStylingRule(#STYLES_COMMENTS, "[;][^\r\n]*")
AddStylingFolder(1, ";{[^\r\n]*")
AddStylingFolder(0, ";}[^\r\n]*")
EndIf
AddStylingRule(#STYLES_NUMBERS, "[\d][\d.]*")
AddStylingRule(#STYLES_NUMBERS, "[.][\d]+")
AddStylingRule(#STYLES_NUMBERS, "['][^']*[']?")
AddStylingRule(#STYLES_NUMBERS, "[$][\dA-F]*")
AddStylingRule(#STYLES_NUMBERS, "[%][0-1]+")
AddStylingRule(#STYLES_CONSTANTS, "[#][\w\d]*[$]?")
If AddStylingRule(#STYLES_STRUCTURES, "[\\][\s]*[\w\d]+[$]?")
AddStylingLeftPart("[\\][\s]*", #STYLES_SEPARATORS)
EndIf
If AddStylingRule(#STYLES_STRUCTURES, "[.][\s]*[\w][\w\d]*")
AddStylingLeftPart("[.][\s]*", #STYLES_SEPARATORS)
AddStylingException(0, "[abcdfilqsuw]", #STYLES_NORMAL)
EndIf
If AddStylingRule(#STYLES_POINTERS, "([@][*]?|[*])([\w][\w\d]*[$]?)?");
AddStylingException(-1, "[\[{(,:\-=+*<>/%&|]*[\s]*")
EndIf
AddStylingRule(#STYLES_OPERATORS, "[\-=+*<>/%&|][\s]*")
AddStylingRule(#STYLES_SEPARATORS, "[(),:.\[\]{}\\]+[\s]*")
If AddStylingRule(#STYLE_DEFAULT, "[\w][\w\d]*[$]?")
AddStylingException(1, "[\s]*([.][\s]*[\w]+[\s]*)?[(]", #STYLES_FUNCTIONS)
AddStylingException(0, "(?i)(debug|procedurereturn|procedure[$]?|endprocedure|end|endif|if|dim|protected|endmacro|macro)", #STYLES_KEYWORDS)
AddStylingFolder(1,"(?i)(procedure[$]?|macro)")
AddStylingFolder(0,"(?i)(endprocedure|endmacro)")
EndIf
AddStylingRule(#STYLES_STRINGS, "[\x22][^\x22]*[\x22]?")
AddStylingRule(#STYLES_NORMAL, "[^ \t(),:.\[\]{}\\\-=+*<>/%&|#\x22']+")
I found a way to do it but there's a remaining problem (cursor jump)ts-soft wrote: 2. case correction
I see. Oksrod wrote:Eddy, please start a new thread for your new version of GoScintilla. I shall be sticking with my version at the moment because it suits my purposes and may add your modifications at some later time, when I have time to take a look. I have no internet connection at this time (am having to borrow one) and will be without internet for some time now by the looks of it.
Code: Select all
keyWord$ = Trim(keyWord$)
alike, i think this is a bug on the linux-version but can only reproduce with your large codesrod wrote:Sorry Thomas but I do not understand that error?