diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index 984e0163..24f773d4 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -1092,26 +1092,10 @@ var EditSession = function(text, mode) { }; this.getDocumentLastRowColumn = function(docRow, docColumn) { - if (!this.$useWrapMode) { - return this.getLine(docRow).length; - } - var screenRow = this.documentToScreenRow(docRow, docColumn); return this.getScreenLastRowColumn(screenRow, true); } - this.getScreenFirstRowColumn = function(screenRow) { - if (!this.$useWrapMode) { - return 0; - } - - var rowData = this.$screenToDocumentRow(screenRow); - var docRow = rowData[0], - row = rowData[1]; - - return this.$wrapData[docRow][row - 1] || 0; - }; - this.getRowSplitData = function(row) { if (!this.$useWrapMode) { return undefined; @@ -1213,10 +1197,6 @@ var EditSession = function(text, mode) { } this.screenToDocumentRow = function(screenRow, screenColumn) { - if (screenColumn == null) { - screenColumn = 0; - // throw "Need to pass in screenColumn"; - } return this.screenToDocumentPosition(screenRow, screenColumn).row; }; diff --git a/lib/ace/selection.js b/lib/ace/selection.js index 6a5bd7b8..e7c141c7 100644 --- a/lib/ace/selection.js +++ b/lib/ace/selection.js @@ -306,7 +306,7 @@ var Selection = function(session) { var row = this.selectionLead.row; var column = this.selectionLead.column; var screenRow = this.session.documentToScreenRow(row, column); - var firstRowColumn = this.session.getScreenFirstRowColumn(screenRow); + var firstRowColumn = this.session.screenToDocumentColumn(screenRow, 0) var beforeCursor = this.doc.getLine(row).slice(firstRowColumn, column); var leadingSpace = beforeCursor.match(/^\s*/); if (leadingSpace[0].length == 0) { diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 7e15cf81..964e7b27 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -481,7 +481,7 @@ var VirtualRenderer = function(container, theme) { firstRowScreen = session.documentToScreenRow(firstRow); firstRowHeight = session.getRowHeight(lineHeight, firstRow); - lastRow = Math.min(session.screenToDocumentRow(lastRow), session.getLength() - 1); + lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); minHeight = this.$size.scrollerHeight + session.getRowHeight(lineHeight, lastRow)+ firstRowHeight;