From 7e2933b983f85451005c1347f569b2ce3408c24d Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Mon, 26 Mar 2012 15:31:47 -0700 Subject: [PATCH] Remove Editor.getCurrentBufferLine --- spec/atom/editor-spec.coffee | 6 +++--- src/atom/editor.coffee | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/atom/editor-spec.coffee b/spec/atom/editor-spec.coffee index 6fe4a20a4..0621eb648 100644 --- a/spec/atom/editor-spec.coffee +++ b/spec/atom/editor-spec.coffee @@ -1020,13 +1020,13 @@ describe "Editor", -> it "inserts the typed character at the cursor position, both in the buffer and the pre element", -> editor.setCursorScreenPosition(row: 1, column: 6) - expect(editor.getCurrentBufferLine().charAt(6)).not.toBe 'q' + expect(buffer.lineForRow(1).charAt(6)).not.toBe 'q' editor.hiddenInput.textInput 'q' - expect(editor.getCurrentBufferLine().charAt(6)).toBe 'q' + expect(buffer.lineForRow(1).charAt(6)).toBe 'q' expect(editor.getCursorScreenPosition()).toEqual(row: 1, column: 7) - expect(editor.lines.find('.line:eq(1)')).toHaveText editor.getCurrentBufferLine() + expect(editor.lines.find('.line:eq(1)')).toHaveText buffer.lineForRow(1) it "does not update the cursor position if the editor is not focused", -> editor.isFocused = false diff --git a/src/atom/editor.coffee b/src/atom/editor.coffee index 8c2a171bd..9d210bff8 100644 --- a/src/atom/editor.coffee +++ b/src/atom/editor.coffee @@ -349,7 +349,6 @@ class Editor extends View moveCursorRight: -> @compositeCursor.moveRight() moveCursorLeft: -> @compositeCursor.moveLeft() - getCurrentBufferLine: -> @buffer.lineForRow(@getCursorBufferRow()) setCursorScreenPosition: (position) -> @compositeCursor.setScreenPosition(position) getCursorScreenPosition: -> @getCursor().getScreenPosition() setCursorBufferPosition: (position) -> @getCursor().setBufferPosition(position)