From d4a1a114a8b352430e0bf3a9f62b2c6284bc2979 Mon Sep 17 00:00:00 2001 From: Landon Abney Date: Thu, 6 Apr 2017 13:59:19 -0700 Subject: [PATCH] Revert "Merge pull request #853 from yacut/restore-cursor-position-after-fix" This reverts commit 27d5570b443af055bce13f0c06f6328c82f9f88b. --- src/main.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main.js b/src/main.js index fe3cf99c..1895434a 100644 --- a/src/main.js +++ b/src/main.js @@ -234,9 +234,6 @@ module.exports = { rules = ignoredRulesWhenFixing } - // The fix replaces the file content and the cursor jumps automatically - // to the beginning of the file, so save current cursor position - const cursorPosition = textEditor.getCursorBufferPosition() if (!helpers) { helpers = require('./helpers') } @@ -256,8 +253,6 @@ module.exports = { if (!isSave) { atom.notifications.addSuccess(response) } - // Set cursor to the position before fix job - textEditor.setCursorBufferPosition(cursorPosition) } catch (err) { atom.notifications.addWarning(err.message) }