From 6e63ea962de4bbc6bc9826c6f11047081d5bf174 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 17 Jul 2013 13:10:48 +0000 Subject: [PATCH] refactor(edit) mv setSize to diff --- lib/client/edit.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/client/edit.js b/lib/client/edit.js index 1a8ecf00..17c9ec33 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -79,9 +79,7 @@ var CloudCmd, Util, DOM, JsDiff, ace; if ( Util.strCmp(Value, lValue) ) Util.log('edit: nothing to save'); - else { - DOM.setCurrentSize( lLength, lCurrent ); - + else diff(lName, lValue, function(pDiff) { var lData, lPatch = '', @@ -94,9 +92,9 @@ var CloudCmd, Util, DOM, JsDiff, ace; lPatch = '?patch'; } + DOM.setCurrentSize( lLength, lCurrent ); DOM.RESTfull.save( lPath, lData, null, lPatch); }); - } } }); }