From 6e3cc80b00a28a254a9ee9eeece410b868c1d0df Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Nov 2013 08:07:03 +0000 Subject: [PATCH] fix(edit) set Value befor onSave --- lib/client/edit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/client/edit.js b/lib/client/edit.js index 1b5ffec0..c5699aba 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -127,6 +127,8 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; Util.ifExec(!isDiff, function(patch) { var query; + Value = lValue; + if (Util.isString(patch)) { lValue = patch; query = '?patch'; @@ -193,7 +195,6 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; msg = '\nShould I save file anyway?'; if (!isError) { - Value = Ace.getValue(); Edit.showMessage(text); DOM.saveDataToCache(path, Value); } else {