cleanup
This commit is contained in:
parent
f352165725
commit
6e9c9417fc
9 changed files with 62 additions and 56 deletions
|
|
@ -470,7 +470,7 @@ var EditSession = function(text, mode) {
|
|||
* @param {Number} tabSize The new tab size
|
||||
**/
|
||||
this.setTabSize = function(tabSize) {
|
||||
this.setOption("tabSize", tabSize)
|
||||
this.setOption("tabSize", tabSize);
|
||||
};
|
||||
/**
|
||||
* Returns the current tab size.
|
||||
|
|
@ -486,7 +486,7 @@ var EditSession = function(text, mode) {
|
|||
*
|
||||
**/
|
||||
this.isTabStop = function(position) {
|
||||
return this.$useSoftTabs && (position.column % this.$tabSize == 0);
|
||||
return this.$useSoftTabs && (position.column % this.$tabSize === 0);
|
||||
};
|
||||
|
||||
this.$overwrite = false;
|
||||
|
|
@ -500,7 +500,7 @@ var EditSession = function(text, mode) {
|
|||
*
|
||||
**/
|
||||
this.setOverwrite = function(overwrite) {
|
||||
this.setOption("overwrite", overwrite)
|
||||
this.setOption("overwrite", overwrite);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -622,14 +622,14 @@ var EditSession = function(text, mode) {
|
|||
clazz : clazz,
|
||||
inFront: !!inFront,
|
||||
id: id
|
||||
}
|
||||
};
|
||||
|
||||
if (inFront) {
|
||||
this.$frontMarkers[id] = marker;
|
||||
this._signal("changeFrontMarker")
|
||||
this._signal("changeFrontMarker");
|
||||
} else {
|
||||
this.$backMarkers[id] = marker;
|
||||
this._signal("changeBackMarker")
|
||||
this._signal("changeBackMarker");
|
||||
}
|
||||
|
||||
return id;
|
||||
|
|
@ -652,10 +652,10 @@ var EditSession = function(text, mode) {
|
|||
|
||||
if (inFront) {
|
||||
this.$frontMarkers[id] = marker;
|
||||
this._signal("changeFrontMarker")
|
||||
this._signal("changeFrontMarker");
|
||||
} else {
|
||||
this.$backMarkers[id] = marker;
|
||||
this._signal("changeBackMarker")
|
||||
this._signal("changeBackMarker");
|
||||
}
|
||||
|
||||
return marker;
|
||||
|
|
@ -1043,14 +1043,14 @@ var EditSession = function(text, mode) {
|
|||
};
|
||||
|
||||
this.getLineWidgetMaxWidth = function() {
|
||||
if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth
|
||||
if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;
|
||||
var width = 0;
|
||||
this.lineWidgets.forEach(function(w) {
|
||||
if (w && w.screenWidth > width)
|
||||
width = w.screenWidth;
|
||||
});
|
||||
return this.lineWidgetWidth = width;
|
||||
}
|
||||
};
|
||||
|
||||
this.$computeWidth = function(force) {
|
||||
if (this.$modified || force) {
|
||||
|
|
@ -1268,7 +1268,7 @@ var EditSession = function(text, mode) {
|
|||
// Check if this range and the last undo range has something in common.
|
||||
// If true, merge the ranges.
|
||||
if (lastUndoRange != null) {
|
||||
if (Range.comparePoints(lastUndoRange.start, range.start) == 0) {
|
||||
if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {
|
||||
lastUndoRange.start.column += range.end.column - range.start.column;
|
||||
lastUndoRange.end.column += range.end.column - range.start.column;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue