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:
parent
1869024de6
commit
41df1f265f
1 changed files with 3 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue