Why last block (self closing) not folded

All questions regarding lexer highlighting schemes are discussed here...
Locked
checkid
Posts: 14
Joined: 05.03.2013 15:09

Why last block (self closing) not folded

Post by checkid »

Hi
There seems to be another thing which I am unable to make it work.
In the rules, I have a "Range Start" block type with the "Self Closing Range" & "Display in Syntax Tree" checked.

In the settings for Tree/Map, "Auto Synchronize" and "Auto Expand" are checked.

With this setting, when I click inside the editor in the last "Self Closing Range" it doesn't synchronize itself with the Syntax tree... rather collapses the tree completely.

How can I fix this?

Thx & Regards.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Send me lexer file, make it by ExLexer addon... and sample file..
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

It is simple: tree not synchred with last item, as last item not closed
(also see block not folded)
- set flag for rule: /Close block at end of text/
checkid
Posts: 14
Joined: 05.03.2013 15:09

Post by checkid »

Hi Alexey,
I tried with the that option /Close block at end of text/, before. But this gives me a tree like below.

Code: Select all

+-- declaration:
    +-- Before
        +-- before.sample.10:
        +-- before.sample.20:
            +-- Detail
                +-- detail.5:
                +-- detail.10:
                    +-- functions:
                        +-- do.something()
That is because each section stops at the start of next section and there is no delimitation.
The tree, I am creating is like this.

Code: Select all

+-- declaration:
+-- Before
    +-- before.sample.10:
    +-- before.sample.20:
+-- Detail
    +-- detail.5:
    +-- detail.10:
+-- functions:
    +-- do.something()
Hope there is someway way to fix this.

Regards,
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Change group for rules-
Detail -- \Detail
Before -- \Before
checkid
Posts: 14
Joined: 05.03.2013 15:09

Post by checkid »

Adding the \ did the trick. Thx.
Locked