parent
f7786930e9
commit
dfe918e339
2 changed files with 39 additions and 26 deletions
|
|
@ -375,14 +375,7 @@ var EditSession = function(text, mode) {
|
|||
token.start = c - token.value.length;
|
||||
return token;
|
||||
};
|
||||
|
||||
this.highlight = function(re) {
|
||||
if (!this.$searchHighlight) {
|
||||
var highlight = new SearchHighlight(null, "ace_selected-word", "text");
|
||||
this.$searchHighlight = this.addDynamicMarker(highlight);
|
||||
}
|
||||
this.$searchHighlight.setRegexp(re);
|
||||
}
|
||||
|
||||
/**
|
||||
* EditSession.setUndoManager(undoManager)
|
||||
* - undoManager (UndoManager): The new undo manager
|
||||
|
|
@ -736,6 +729,30 @@ var EditSession = function(text, mode) {
|
|||
return inFront ? this.$frontMarkers : this.$backMarkers;
|
||||
};
|
||||
|
||||
this.highlight = function(re) {
|
||||
if (!this.$searchHighlight) {
|
||||
var highlight = new SearchHighlight(null, "ace_selected-word", "text");
|
||||
this.$searchHighlight = this.addDynamicMarker(highlight);
|
||||
}
|
||||
this.$searchHighlight.setRegexp(re);
|
||||
}
|
||||
|
||||
// experimental
|
||||
this.highlightLines = function(startRow, endRow, clazz, inFront) {
|
||||
if (typeof endRow != "number") {
|
||||
clazz = endRow;
|
||||
endRow = startRow;
|
||||
}
|
||||
if (!clazz)
|
||||
clazz = "ace_step";
|
||||
|
||||
var range = new Range(startRow, 0, endRow, Infinity);
|
||||
|
||||
var id = this.addMarker(range, clazz, "fullLine", inFront);
|
||||
range.id = id;
|
||||
return range;
|
||||
},
|
||||
|
||||
/*
|
||||
* Error:
|
||||
* {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue