enable folding in other modes
This commit is contained in:
parent
71d5f359fb
commit
0867c5ec40
10 changed files with 43 additions and 40 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue