Base the screen range of the selection view on the selection model

This commit is contained in:
Nathan Sobo
2012-06-08 11:21:37 -06:00
parent eed9af4c45
commit f3144fe0d8
5 changed files with 83 additions and 27 deletions

View File

@@ -17,8 +17,8 @@ describe "Selection", ->
it "places the anchor at the start of the range and the cursor at the end", ->
range = new Range({row: 2, column: 7}, {row: 3, column: 18})
selection.setBufferRange(range)
expect(selection.anchor.getScreenPosition()).toEqual range.start
expect(selection.cursor.getScreenPosition()).toEqual range.end
expect(selection.selection.anchor.getScreenPosition()).toEqual range.start
expect(selection.selection.cursor.getScreenPosition()).toEqual range.end
describe ".deleteSelectedText()", ->
describe "when nothing is selected", ->