From bcfa340a112009500a4d2b2c778187c104793a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Fri, 18 Sep 2015 15:14:23 +0200 Subject: Reapply 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/codeq/prolog.js | 2 +- js/codeq/python.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'js/codeq') diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js index e411895..b12a5d2 100644 --- a/js/codeq/prolog.js +++ b/js/codeq/prolog.js @@ -372,7 +372,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': 'r', 'off': pos, 'len': codeq.codePointCount(changeObj.removed.join(''))}); } if (changeObj.text) { diff --git a/js/codeq/python.js b/js/codeq/python.js index 868055c..0075a72 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -323,7 +323,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 From 345472c7f88435cd8d9aa5d26513358376c78c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Fri, 18 Sep 2015 15:16:05 +0200 Subject: Bugfix of the previous Bugfix (typo). --- js/codeq/python.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/codeq') diff --git a/js/codeq/python.js b/js/codeq/python.js index 0075a72..e856c08 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -323,7 +323,7 @@ pos = codeq.codePointCount(doc.getRange(firstCharacterPos, changeObj.from)); if (changeObj.removed) { - activityHandler.queueTrace({'typ': 'rm', 'off': pos, 'len': codeq.codePointCount(changeObj.removed).join('')}); + activityHandler.queueTrace({'typ': 'rm', 'off': pos, 'len': codeq.codePointCount(changeObj.removed.join(''))}); } if (changeObj.text) { -- cgit v1.2.1