Merge branch 'master' of github.com:ajaxorg/ace
This commit is contained in:
parent
7206c60dc6
commit
52c236cea9
2 changed files with 7 additions and 6 deletions
|
|
@ -1151,6 +1151,10 @@ var EditSession = function(text, mode) {
|
||||||
column: column
|
column: column
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var rowData = this.$documentToScreenRow(row, column);
|
||||||
|
var screenRow = rowData[0];
|
||||||
|
|
||||||
if (row >= this.getLength()) {
|
if (row >= this.getLength()) {
|
||||||
return {
|
return {
|
||||||
row: screenRow,
|
row: screenRow,
|
||||||
|
|
@ -1160,11 +1164,8 @@ var EditSession = function(text, mode) {
|
||||||
|
|
||||||
var split;
|
var split;
|
||||||
var wrapRowData = this.$wrapData[row];
|
var wrapRowData = this.$wrapData[row];
|
||||||
var screenRow, screenRowOffset;
|
|
||||||
var screenColumn;
|
var screenColumn;
|
||||||
var rowData = this.$documentToScreenRow(row, column);
|
var screenRowOffset = rowData[1];
|
||||||
screenRow = rowData[0];
|
|
||||||
screenRowOffset = rowData[1];
|
|
||||||
|
|
||||||
str = this.getLine(row).substring(
|
str = this.getLine(row).substring(
|
||||||
wrapRowData[screenRowOffset - 1] || 0, column);
|
wrapRowData[screenRowOffset - 1] || 0, column);
|
||||||
|
|
@ -1191,4 +1192,4 @@ var EditSession = function(text, mode) {
|
||||||
}).call(EditSession.prototype);
|
}).call(EditSession.prototype);
|
||||||
|
|
||||||
exports.EditSession = EditSession;
|
exports.EditSession = EditSession;
|
||||||
});
|
});
|
||||||
|
|
@ -1023,9 +1023,9 @@ var Editor =function(renderer, session) {
|
||||||
this.$blockScrolling += 1;
|
this.$blockScrolling += 1;
|
||||||
for (var i = ranges.length - 1; i >= 0; --i)
|
for (var i = ranges.length - 1; i >= 0; --i)
|
||||||
this.$tryReplace(ranges[i], replacement);
|
this.$tryReplace(ranges[i], replacement);
|
||||||
this.$blockScrolling -= 1;
|
|
||||||
|
|
||||||
this.selection.setSelectionRange(selection);
|
this.selection.setSelectionRange(selection);
|
||||||
|
this.$blockScrolling -= 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
this.$tryReplace = function(range, replacement) {
|
this.$tryReplace = function(range, replacement) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue