fix bug from previous commit, splits is undefined
This commit is contained in:
parent
03a88d3fcf
commit
5479c69482
1 changed files with 6 additions and 4 deletions
|
|
@ -1442,9 +1442,12 @@ var EditSession = function(text, mode) {
|
|||
|
||||
if (this.$useWrapMode) {
|
||||
splits = this.$wrapData[docRow];
|
||||
if (splits && screenRow > row && splits.length) {
|
||||
docColumn = splits[screenRow - row - 1] || splits[splits.length - 1];
|
||||
line = line.substring(docColumn);
|
||||
if (splits) {
|
||||
column = splits[screenRow - row]
|
||||
if(screenRow > row && splits.length) {
|
||||
docColumn = splits[screenRow - row - 1] || splits[splits.length - 1];
|
||||
line = line.substring(docColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1452,7 +1455,6 @@ var EditSession = function(text, mode) {
|
|||
|
||||
// Need to do some clamping action here.
|
||||
if (this.$useWrapMode) {
|
||||
column = splits[screenRow - row]
|
||||
if (docColumn >= column) {
|
||||
// We remove one character at the end such that the docColumn
|
||||
// position returned is not associated to the next row on the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue