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); }); - } } }); }