From 8344ff72ee313e913d4a3a64e02463e427b42a69 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 25 Jun 2015 17:51:21 +0200 Subject: [PATCH] Don't use editor.{begin|commit}Transaction This solves the following error (but I'm not sure if not using transactions at all is the "real" solution ...): Uncaught TypeError: undefined is not a function At .../Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1156 TypeError: undefined is not a function at TextEditor.module.exports.TextEditor.beginTransaction (.../Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1156:26) at .../lib/pipe.coffee:37:14 at space-pen-div. (.../lib/command-view.coffee:32:7) at space-pen-div.jQuery.event.dispatch (.../node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4435:9) at space-pen-div.elemData.handle (.../node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4121:28) at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (.../Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (.../Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22) at HTMLDocument.module.exports.WindowEventHandler.onKeydown (.../Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:180:20) --- lib/pipe.coffee | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/pipe.coffee b/lib/pipe.coffee index 97ada8a..7c97563 100644 --- a/lib/pipe.coffee +++ b/lib/pipe.coffee @@ -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 -- 2.39.2