From aa2a0a6a577dfbc6bb23d5967d2c031a4ca5be26 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 1 Oct 2014 11:12:59 -0400 Subject: [PATCH] fix(buffer) copy, or cut, after cut, do not prevent previous cutting --- lib/client/buffer.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/client/buffer.js b/lib/client/buffer.js index 26386f17..377d9364 100644 --- a/lib/client/buffer.js +++ b/lib/client/buffer.js @@ -40,9 +40,10 @@ var Util, DOM; } function rmCutClass() { - var files = DOM.getActiveFiles(); + var files = DOM.getByClassAll(CLASS), + array = Util.slice(files); - files.forEach(function(element) { + array.forEach(function(element) { DOM.removeClass(element, CLASS); }); } @@ -70,6 +71,8 @@ var Util, DOM; names = getNames(), from = Info.dirPath; + clear(); + Storage.remove(CUT) .set(COPY, { from : from, @@ -82,9 +85,10 @@ var Util, DOM; names = getNames(), from = Info.dirPath; + clear(); addCutClass(); - Storage.remove(COPY) + Storage .set(CUT, { from : from, names: names