         expect(editSession.getCursors().length).toBe 2
         [cursor1, cursor2] = editSession.getCursors()
         expect(cursor1.getBufferPosition()).toEqual [0,13]
-        expect(cursor2.getBufferPosition()).toEqual [3,51]
+        expect(cursor2.getBufferPosition()).toEqual [3,50]
 
         expect(editSession.getSelections().length).toBe 2
         [selection1, selection2] = editSession.getSelections()
         expect(selection1.getBufferRange()).toEqual [[0,4], [0,13]]
         expect(selection1.isReversed()).toBeFalsy()
-        expect(selection2.getBufferRange()).toEqual [[3,48], [3,51]]
+        expect(selection2.getBufferRange()).toEqual [[3,48], [3,50]]
         expect(selection2.isReversed()).toBeFalsy()
 
     describe ".selectWord()", ->
-       describe "when the cursor is inside a word", ->
-         it "selects the entire word", ->
-           editSession.setCursorScreenPosition([0, 8])
-           editSession.selectWord()
-           expect(editSession.getSelectedText()).toBe 'quicksort'
-
-       describe "when the cursor is between two words", ->
-         it "selects both words", ->
-           editSession.setCursorScreenPosition([0, 4])
-           editSession.selectWord()
-           expect(editSession.getSelectedText()).toBe ' quicksort'
-
-       describe "when the cursor is inside a region of whitespace", ->
-         it "selects the whitespace region", ->
-           editSession.setCursorScreenPosition([5, 2])
-           editSession.selectWord()
-           expect(editSession.getSelectedBufferRange()).toEqual [[5, 0], [5, 6]]
-
-       describe "when the cursor is at the end of the text", ->
-         it "select the previous word", ->
-           editSession.buffer.append 'word'
-           editSession.moveCursorToBottom()
-           editSession.selectWord()
-           expect(editSession.getSelectedBufferRange()).toEqual [[12, 2], [12, 6]]
+      describe "when the cursor is inside a word", ->
+        it "selects the entire word", ->
+          editSession.setCursorScreenPosition([0, 8])
+          editSession.selectWord()
+          expect(editSession.getSelectedText()).toBe 'quicksort'
+
+      describe "when the cursor is between two words", ->
+        it "selects the nearest word", ->
+          editSession.setCursorScreenPosition([0, 4])
+          editSession.selectWord()
+          expect(editSession.getSelectedText()).toBe 'quicksort'
+
+      describe "when the cursor is inside a region of whitespace", ->
+        it "selects the whitespace region", ->
+          editSession.setCursorScreenPosition([5, 2])
+          editSession.selectWord()
+          expect(editSession.getSelectedBufferRange()).toEqual [[5, 0], [5, 6]]
+
+          editSession.setCursorScreenPosition([5, 0])
+          editSession.selectWord()
+          expect(editSession.getSelectedBufferRange()).toEqual [[5, 0], [5, 6]]
+
+      describe "when the cursor is at the end of the text", ->
+        it "select the previous word", ->
+          editSession.buffer.append 'word'
+          editSession.moveCursorToBottom()
+          editSession.selectWord()
+          expect(editSession.getSelectedBufferRange()).toEqual [[12, 2], [12, 6]]
 
     describe ".setSelectedBufferRanges(ranges)", ->
       it "clears existing selections and creates selections for each of the given ranges", ->

        editSession.moveCursorToBeginningOfWord()
        expect(editSession.getCursorBufferPosition()).toEqual [9, 2]

    fdescribe ".moveCursorToEndOfWord()", ->
      it "moves the cursor to the end of the word", ->
        editSession.setCursorBufferPosition [0, 6]
        editSession.addCursorAtBufferPosition [1, 10]

          expect(cursor2.getBufferPosition()).toEqual [2, 5]

          editSession.deleteToEndOfWord()
          expect(buffer.lineForRow(1)).toBe '  var sort = function(it {'
          expect(buffer.lineForRow(2)).toBe '    iitems.length <= 1) return items;'
          expect(cursor1.getBufferPosition()).toEqual [1, 24]
          expect(cursor2.getBufferPosition()).toEqual [2, 5]
