Comments (3)
The behaviour appears to be in accordance with the design.
Folding is based strictly on fold level which increments for fold start points "(", "begin", "`ifdef" and decrements for fold end points ")", "end", "`endif". There is no matching of fold feature types, so keyword "begin" may match pre-processor "`endif".
If you want folding to match feature types then you should describe in detail the mechanics of how that would work, particularly with overlapping ranges such as in this example.
from lexilla.
if it encounters a fold end point if it matches to fold start point then it should decrement so that it wont create issue, if it decrements to any fold end point for a fold start point it will be an issue i guess, i know it is complicated to implement just letting know the problem.
from lexilla.
if it encounters a fold end point if it matches to fold start point then it should decrement so that it wont create issue, if it decrements to any fold end point for a fold start point it will be an issue i guess
If you decrement on only matching ends then you will see an elevated level for the rest of the file so folding a previous start will fold the rest of the file.
i know it is complicated to implement just letting know the problem
It appears to me unworkable which is why folding does not differentiate between fold point types. You could try to implement your desired behaviour in your application, possibly as a script.
Since I cannot see a way to reasonably constrain folds to matching types, I do not consider this a bug. Its just how folding works for Scintilla and Lexilla. So I am marking this issue as 'invalid' and will close it.
from lexilla.
Related Issues (20)
- LexerVerilog tries to set line state beyond EOF HOT 2
- R escape sequences don't terminate properly HOT 13
- Syntax highlighting for Svelte HOT 1
- [CSS] Nesting and &-selector HOT 4
- nested square brackets, TeX files
- Syntax colour highlighting of HTML with JSON context in JavaScript section HOT 7
- Shell language lexing mistakes bitwise left shift operator for here document HOT 3
- [Bash] Don't nest `${}` parameter expansion on `{` HOT 1
- unreachable code HOT 1
- Feature Request: Folding by indentation in plain text HOT 2
- Update Assembly (Update Syntax Highlighting)
- Batch Syntax "keyword" + ":" => "keyword:" dont work properly HOT 5
- raw formatted string is not handled in Python lexer HOT 5
- prevent negative code folding level in lexer HOT 26
- [Ruby] fix `number.method` highlighting
- Batch File Syntax Highlighting After 1024 Characters HOT 3
- COBOL syntax and wrap strings HOT 13
- COBOL keywords starting with V are not styled HOT 3
- COBOL * and / comments in columns 7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lexilla.