       return @text.length
     else
       # search backward for the start of the word on the boundary
-      for column in [maxColumn..0] when @isColumnOutsideIndentation(column)
+      for column in [maxColumn..@firstNonWhitespaceIndex]
         return column + 1 if /\s/.test(@text[column])
 
       return maxColumn

  isSoftWrapped: ->
    @lineEnding is null

  isColumnOutsideIndentation: (column) ->
    column >= @firstNonWhitespaceIndex

  isColumnInsideSoftWrapIndentation: (column) ->
    return false if @softWrapIndentationTokens.length == 0


  # Returns a {Number} representing the `line` position where the wrap would take place.
  # Returns `null` if a wrap wouldn't occur.
  findWrapColumn: (maxColumn) ->
    return unless maxColumn?
    return unless @text.length > maxColumn

    if /\s/.test(@text[maxColumn])
