enable folding in other modes

This commit is contained in:
Fabian Jakobs 2011-12-01 15:43:33 +01:00
commit 0867c5ec40
10 changed files with 43 additions and 40 deletions

View file

@ -54,9 +54,10 @@ oop.inherits(Mode, TextMode);
(function() {
this.foldingRules = "cStyle";
this.toggleCommentLines = function(state, doc, startRow, endRow) {
var outdent = true;
var outentedRows = [];
var re = /^(\s*)#/;
for (var i=startRow; i<= endRow; i++) {
@ -88,7 +89,6 @@ oop.inherits(Mode, TextMode);
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
var tokens = tokenizedLine.tokens;
var endState = tokenizedLine.state;
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;