From 99bad1571ed306678d9b0416bf87f37f5f882058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Fri, 18 Sep 2015 13:25:57 +0200 Subject: Bugfix: join the array of removed character into a string, when the user makes a deletion, and it needs to be recorded in activity. --- js/prolog.js | 2 +- js/python.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/prolog.js b/js/prolog.js index 1c811ed..fad1dd4 100644 --- a/js/prolog.js +++ b/js/prolog.js @@ -160,7 +160,7 @@ pos = codeq.codePointCount(doc.getRange(firstCharacterPos, changeObj.from)); if (changeObj.removed) { - activityHandler.queueTrace({'typ': 'rm', 'off': pos, 'len': codeq.codePointCount(changeObj.removed)}); + activityHandler.queueTrace({'typ': 'rm', 'off': pos, 'len': codeq.codePointCount(changeObj.removed.join(''))}); } if (changeObj.text) { diff --git a/js/python.js b/js/python.js index 9d051fe..1f2b5cb 100644 --- a/js/python.js +++ b/js/python.js @@ -108,7 +108,7 @@ pos = codeq.codePointCount(doc.getRange(firstCharacterPos, changeObj.from)); if (changeObj.removed) { - activityHandler.queueTrace({'typ': 'rm', 'off': pos, 'len': codeq.codePointCount(changeObj.removed)}); + activityHandler.queueTrace({'typ': 'rm', 'off': pos, 'len': codeq.codePointCount(changeObj.removed.join(''))}); } if (changeObj.text) { -- cgit v1.2.1