Content divider not refreshed

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by Steven Liu
Avatar
I defined a SectionState which looks ahead to either the next SECTION keyword or document end to close its scope. The following LookAhead pattern allows to exclude multiple blank lines in the section:
PatternValue="\n" LookAhead="[ \t\n]*((SECTION)|(\z))"
The complete syntax definition is:

<SyntaxLanguage Key="MYTEST" LanguageDefinitionVersion="2.0" Secure="True" xmlns="http://ActiproSoftware/SyntaxEditor/2.0/LanguageDefinition">
    <Styles>
        <Style Key="SectionWordStyle" ForeColor="Blue" BackColor="Default" Bold="False" Italic="False" Underline="False" />
    </Styles>
    <States> 
        <State Key="DefaultState"> 
            <ChildStates>
                <ChildState Key="SectionState" />
            </ChildStates>
        </State>
        <State Key="SectionState" >
            <Scopes>
                <Scope>
                    <ExplicitPatternGroup Type="StartScope" Token="SectionStartToken" Style="SectionWordStyle" PatternValue="SECTION" LookAhead="{NonWordMacro}" CaseSensitivity="AutoCorrect" />
                    <RegexPatternGroup Type="EndScope" Token="SectionEndToken" Style="DefaultStyle" PatternValue="\n" LookAhead="[ \t\n]*((SECTION)|(\z))" CaseSensitivity="Insensitive" IsContentDivider="True" />
                </Scope>
            </Scopes>
        </State>
    </States>
</SyntaxLanguage>
Most of the time it works.
However, if you have following document (line numbers showed):

1 SECTION s1
2
3
4 SECTION s2
5
Position cursor at line 3, type: a=1<ENTER>
the content divider should moved to line 3, but it remains at line 1.
It can be fixed by selecting "Reparse Document".
Then, if line 3 is deleted, content divider of "SECTION s1" disappears.
Again it can be fixed by selecting "Reparse Document".


Steven

Comments (4)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I actually noticed that when I was working on your other bug the other day and had placed it on the TODO list. Thanks for posting it though.


Actipro Software Support

Posted 20 years ago by Steven Liu
Avatar
Thanks. Do you have an estimated release date for this fix?
Steven
Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm hoping to have it for the next release.


Actipro Software Support

Posted 20 years ago by Steven Liu
Avatar
Cool. I'll look forward to it. Thanks for the excellent support.
Steven
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.