clamp row before clamping column
This commit is contained in:
parent
577ee94011
commit
0ddf25b27b
1 changed files with 6 additions and 1 deletions
|
|
@ -1425,13 +1425,18 @@ var EditSession = function(text, mode) {
|
|||
}
|
||||
}
|
||||
|
||||
splits = this.$wrapData[docRow] || [];
|
||||
// clamp row before clamping column, for selection on last line
|
||||
var maxRow = this.getLength()-1
|
||||
if(docRow > maxRow)
|
||||
docRow = maxRow;
|
||||
|
||||
foldLine = this.getFoldLine(docRow);
|
||||
line = foldLine
|
||||
? this.getFoldDisplayLine(foldLine)
|
||||
: this.getLine(docRow);
|
||||
|
||||
if (this.$useWrapMode) {
|
||||
splits = this.$wrapData[docRow] || [];
|
||||
docColumn = split = splits[screenRow - row - 1] || 0;
|
||||
line = line.substring(split);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue