Fix fold widget range for region

End range should be at end of line as we don't want to display the
'#endregion' text after the fold widget (this is consistent with cstyle
region comment folding).

Added missing semi-colons.
This commit is contained in:
sevin7676 2014-11-25 07:01:09 -05:00
commit 41df1f265f

View file

@ -110,8 +110,8 @@ oop.inherits(FoldMode, CFoldMode);
var maxRow = session.getLength();
var startRow = row;
var re = /^\s*#(end)?region\b/
var depth = 1
var re = /^\s*#(end)?region\b/;
var depth = 1;
while (++row < maxRow) {
line = session.getLine(row);
var m = re.exec(line);
@ -128,8 +128,7 @@ oop.inherits(FoldMode, CFoldMode);
var endRow = row;
if (endRow > startRow) {
var endColumn = line.search(/\S/);
return new Range(startRow, startColumn, endRow, endColumn);
return new Range(startRow, startColumn, endRow, line.length);
}
};