]> arthur.barton.de Git - atom-ax-pipe.git/blobdiff - lib/pipe.coffee
Don't use editor.{begin|commit}Transaction
[atom-ax-pipe.git] / lib / pipe.coffee
index 3781a56ee719479af896dd1939568251a6478967..7c97563e4eb1e2028090ad4a35a7b6e7fa1547ad 100644 (file)
@@ -6,7 +6,7 @@ history = []
 
 module.exports =
   activate: ->
-    atom.workspaceView.command 'pipe:run', => @run()
+    atom.commands.add 'atom-workspace', "pipe:run", => @run()
 
   run: ->
     editor = atom.workspace.getActiveEditor()
@@ -28,12 +28,10 @@ module.exports =
 
       ranges = editor.getSelectedBufferRanges()
       wg = new WaitGroup ->
-        editor.commitTransaction()
         view.focus()
 
       wg.add(ranges.length)
 
-      editor.beginTransaction()
       for range, i in ranges
         marker = editor.markBufferRange range, properties
         processRange marker, editor, commandString, wg