 
     completion = suggestions[0].slice query.length, length
 
-    # Don't complete trailing whitespace; so, strip it.  Then, verify that the completion is still long
-    # enough.
+    # Don't complete trailing whitespace, strip it.  Then, verify that the completion is still long enough.
     completion = completion.replace /\s+$/, ""
     return unless 0 < completion.length
 

  inputContainsASelectionRange: ->
    @input.selectionStart? and @input.selectionEnd? and @input.selectionStart != @input.selectionEnd

  # Return the text of the input, with any selected text renage removed.
  getInputWithoutSelectionRange: ->
    if @inputContainsASelectionRange()
      @input.value[0...@input.selectionStart] + @input.value[@input.selectionEnd..]

      @input.value

  # Return the background-page query corresponding to the current input state.  In other words, reinstate any
  # search engine keyword which is currently stripped from the input, and strip any selection.
  getInputValueAsQuery: ->
    (if @suppressedLeadingKeyword? then @suppressedLeadingKeyword + " " else "") + @getInputWithoutSelectionRange()

