cleanup
This commit is contained in:
parent
295ae4dc81
commit
a0a31e16a2
1 changed files with 5 additions and 10 deletions
|
|
@ -44,16 +44,11 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
* Inheriting cstyle folding because it handles the region comment folding
|
||||
* and special block comment folding appropriately.
|
||||
*
|
||||
* Cstyle's getCommentRegionBlock() contains the sql comment characters '--'.
|
||||
* Cstyle's getCommentRegionBlock() contains the sql comment characters '--' for end region block.
|
||||
*/
|
||||
|
||||
this.foldingStartMarker = /(\bCASE\b|\bBEGIN\b)|^\s*(\/\*)/i;
|
||||
this.foldingStopMarker = /^(\bEND\b)|^[\s\*]*(\*\/)/i;
|
||||
// this.foldingStopMarker = /(\bEND\b)|^[\s\*]*(\*\/)/i;?need hat?
|
||||
// this.foldingStopMarker = /^(?!\bCASE\b|\bBEGIN\b)(\bEND\b)|^[\s\*]*(\*\/)/i;
|
||||
// this.foldingStopMarker = /^(?!\bCASE\b|\bBEGIN\b).*(\bEND\b)|^[\s\*]*(\*\/)/i;
|
||||
|
||||
|
||||
this.foldingStopMarker = /(\bEND\b)|^[\s\*]*(\*\/)/i;
|
||||
this.startRegionRe = /^\s*(\/\*|--)#?region\b/;
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
|
|
@ -65,19 +60,19 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
if (match) {
|
||||
var i = match.index;
|
||||
if (match[1]) return this.getBeginEndBlock(session, row, i, match[1]);
|
||||
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
console.log('getSectionRange',range);
|
||||
console.log('getSectionRange', range);
|
||||
}
|
||||
else if (foldStyle != "all") range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
|
||||
if (foldStyle === "markbegin") return; //no support for end folding markers yet
|
||||
return;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue