From 13f66fb2ae4495031b64ea88ef262c1da1470b54 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Tue, 12 Aug 2014 00:37:51 -0700 Subject: [PATCH] Add a step to revert unsaved changes I took the key part from PR #3183 and added it to the post-confirmation flow. --- src/editor.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor.coffee b/src/editor.coffee index eae977746..428392f56 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -450,7 +450,9 @@ class Editor extends Model else confirmed = true - repo.checkoutHead(filePath) if confirmed + if confirmed + @buffer.reload() if @buffer.isModified() + repo.checkoutHead(filePath) # Copies the current file path to the native clipboard. copyPathToClipboard: ->