Posted 19 years ago
by Tim Davis
I'm using thie editor for modifying inno setup files, they use different sections. [setup] [code] etc... Each section is outlined by starting with the key (ie [setup]) and ending on a blank new line.
Well my team doesn't like this and point out that their scripts have lots of blank lines within the sections.
Ok, So I write a regex pattern to compensate for this. So now instead of ending the section on a blank line it ends the current section when it sees one of the other valid section names. (ie, setup section would stop folding once it see's [Code])
Macro that each section's EndScope is set to.This works great, but I have found an issue and I'm not sure if it's with the semantic parser or with the control itself.
This is a image of the editor with the folding useing the new method (stop on instance of next section) with the nodes expanded
This is an image of the editor when the first node is collapsed, upon collapsing the first node it completely removes the next node from the document.
Is this a semantic parser or control issue?
Also, using this method is it possible that when the current section sees the stop folding tag (ie begining of next section), if the section ends and there are lets say 3 blank lines that are in the current outline (at the end, just before the next section tag) that I could tell it programaticly to ignore the blank lines and stop the folding at the last actual code line?
[Modified at 04/06/2005 04:07 PM]
Well my team doesn't like this and point out that their scripts have lots of blank lines within the sections.
Ok, So I write a regex pattern to compensate for this. So now instead of ending the section on a blank line it ends the current section when it sees one of the other valid section names. (ie, setup section would stop folding once it see's [Code])
Macro that each section's EndScope is set to.
<Macro Key="HeaderMacro" Value="(\[)(setup|code)(\])" />
This is a image of the editor with the folding useing the new method (stop on instance of next section) with the nodes expanded
This is an image of the editor when the first node is collapsed, upon collapsing the first node it completely removes the next node from the document.
Is this a semantic parser or control issue?
Also, using this method is it possible that when the current section sees the stop folding tag (ie begining of next section), if the section ends and there are lets say 3 blank lines that are in the current outline (at the end, just before the next section tag) that I could tell it programaticly to ignore the blank lines and stop the folding at the last actual code line?
[Modified at 04/06/2005 04:07 PM]