Permalink
Browse files

fix coffeescript folding for "[#{}"

  • Loading branch information...
1 parent 34d9066 commit d999ef52678de25ccde9e8f80c1cf587cf439fca @nightwing nightwing committed Jun 14, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/ace/mode/folding/fold_mode.js
  2. +1 −1 lib/ace/mode/folding/pythonic.js
@@ -101,7 +101,7 @@ var FoldMode = exports.FoldMode = function() {};
if (fw == null)
fw = this.getFoldWidget(session, end.row);
- if (fw == "start") {
+ if (fw == "start" && end.row > start.row) {
end.row --;
end.column = session.getLine(end.row).length;
}
@@ -42,7 +42,7 @@ var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
var FoldMode = exports.FoldMode = function(markers) {
- this.foldingStartMarker = new RegExp("(?:([\\[{])|(" + markers + "))(?:\\s*)(?:#.*)?$");
+ this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$");
};
oop.inherits(FoldMode, BaseFoldMode);

0 comments on commit d999ef5

Please sign in to comment.