code style
This commit is contained in:
parent
6917f7c672
commit
16ca8e1b02
14 changed files with 33 additions and 38 deletions
|
|
@ -1061,7 +1061,7 @@ var EditSession = function(text, mode) {
|
|||
if (i > foldStart) {
|
||||
i = foldLine.end.row + 1;
|
||||
if (i >= len)
|
||||
break
|
||||
break;
|
||||
foldLine = this.$foldData[foldIndex++];
|
||||
foldStart = foldLine ? foldLine.start.row : Infinity;
|
||||
}
|
||||
|
|
@ -1478,7 +1478,7 @@ var EditSession = function(text, mode) {
|
|||
this.$clipRangeToDocument = function(range) {
|
||||
if (range.start.row < 0) {
|
||||
range.start.row = 0;
|
||||
range.start.column = 0
|
||||
range.start.column = 0;
|
||||
} else {
|
||||
range.start.column = this.$clipColumnToRow(
|
||||
range.start.row,
|
||||
|
|
@ -1576,7 +1576,7 @@ var EditSession = function(text, mode) {
|
|||
this.$modified = true;
|
||||
if (this.$useWrapMode) {
|
||||
this.$updateWrapData(0, this.getLength() - 1);
|
||||
this.$resetRowCache(0)
|
||||
this.$resetRowCache(0);
|
||||
this._emit("changeWrapLimit");
|
||||
}
|
||||
return true;
|
||||
|
|
@ -1943,7 +1943,7 @@ var EditSession = function(text, mode) {
|
|||
addSplit(split);
|
||||
}
|
||||
return splits;
|
||||
}
|
||||
};
|
||||
|
||||
/** internal, hide
|
||||
* EditSession.$getDisplayTokens(str, offset) -> Array
|
||||
|
|
@ -1981,7 +1981,7 @@ var EditSession = function(text, mode) {
|
|||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
};
|
||||
|
||||
/** internal, hide
|
||||
* EditSession.$getStringScreenWidth(str, maxScreenColumn, screenColumn) -> [Number]
|
||||
|
|
@ -2017,12 +2017,12 @@ var EditSession = function(text, mode) {
|
|||
screenColumn += 1;
|
||||
}
|
||||
if (screenColumn > maxScreenColumn) {
|
||||
break
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return [screenColumn, column];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* EditSession.getRowLength(row) -> Number
|
||||
|
|
@ -2037,7 +2037,7 @@ var EditSession = function(text, mode) {
|
|||
} else {
|
||||
return this.$wrapData[row].length + 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* EditSession.getRowHeight(config, row) -> Number
|
||||
|
|
@ -2049,7 +2049,7 @@ var EditSession = function(text, mode) {
|
|||
**/
|
||||
this.getRowHeight = function(config, row) {
|
||||
return this.getRowLength(row) * config.lineHeight;
|
||||
}
|
||||
};
|
||||
|
||||
/** internal, hide, related to: EditSession.documentToScreenColumn
|
||||
* EditSession.getScreenLastRowColumn(screenRow) -> Number
|
||||
|
|
@ -2058,7 +2058,7 @@ var EditSession = function(text, mode) {
|
|||
* Returns the column position (on screen) for the last character in the provided row.
|
||||
**/
|
||||
this.getScreenLastRowColumn = function(screenRow) {
|
||||
var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE)
|
||||
var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
|
||||
return this.documentToScreenColumn(pos.row, pos.column);
|
||||
};
|
||||
|
||||
|
|
@ -2145,8 +2145,6 @@ var EditSession = function(text, mode) {
|
|||
|
||||
var rowCache = this.$screenRowCache;
|
||||
var i = this.$getRowCacheIndex(rowCache, screenRow);
|
||||
var row1 = rowCache[i];
|
||||
var docRow1 = this.$docRowCache[i];
|
||||
if (0 < i && i < rowCache.length) {
|
||||
var row = rowCache[i];
|
||||
var docRow = this.$docRowCache[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue