     @subscriptions.add @editor.onDidDestroy => @destroy()
 
     @subscriptions.add @editor.onDidChange =>
-      @terminateRunningTask()
+      @terminateRunningTask() if @initialized and @variableInitialized
       clearTimeout(@timeout) if @timeout?
 
     @subscriptions.add @editor.onDidStopChanging =>

    .then (results) =>
      @updateColorMarkers(results)
    .catch (reason) ->

  terminateRunningTask: -> @task?.terminate()



    @initializePromise = @scanBufferForColors().then (results) =>
      @colorMarkers = @createColorMarkers(results)
      @initialized = true

    @variablesAvailable()
    @initializePromise
