From 6dded08d10cff79c4b06e4ed083ce5ba51b58d66 Mon Sep 17 00:00:00 2001 From: RikedyP Date: Thu, 7 Oct 2021 09:48:17 +0100 Subject: [PATCH 1/2] fix #21 --- lib/tryapl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tryapl.js b/lib/tryapl.js index bb4b41e..d19fa14 100644 --- a/lib/tryapl.js +++ b/lib/tryapl.js @@ -96,7 +96,7 @@ function loadTryAPL () { // Continue collecting input lines if accumulated multiline input string has unclosed braces // --- To do --- // Extend Continue to deal with different types of multiline structures - Continue=t=>0<[...t.replace(/'[^']+'/g,"").replace(/⍝.*/g,"")].map(c=>c=="{"?1:c=="}"?-1:0).reduce((a,b)=>a+b) + Continue=t=>0<[...t.replace(/'[^']*'/g,"").replace(/⍝.*/g,"")].map(c=>c=="{"?1:c=="}"?-1:0).reduce((a,b)=>a+b) if (getSessionInput(0)[0]=="\t") { log ("submit multiple lines") From a2538c570165632e640f99fdb6acb293629463c8 Mon Sep 17 00:00:00 2001 From: RikedyP Date: Thu, 7 Oct 2021 10:18:04 +0100 Subject: [PATCH 2/2] fix #17 --- lib/tiolb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tiolb.js b/lib/tiolb.js index ee60a00..e9111f0 100644 --- a/lib/tiolb.js +++ b/lib/tiolb.js @@ -42,8 +42,8 @@ ev(lb,'mousedown',x=>{ }) let fk=x=>{ let t=x.target - if(bqm){let i=t.selectionStart,v=t.value,c=bqc[x.key];if(x.which>31){bqm=0;d.body.classList.remove('ngn_bq')} - if(c){t.value=v.slice(0,i)+c+v.slice(i);t.selectionStart=t.selectionEnd=i+1;pd(x);return!1}} + if(bqm){let i=t.selectionStart,j=t.selectionEnd,v=t.value,c=bqc[x.key];if(x.which>31){bqm=0;d.body.classList.remove('ngn_bq');log("INS")} + if(c){t.value=v.slice(0,i)+c+v.slice(j);t.selectionStart=t.selectionEnd=i+1;pd(x);return!1}} if (!x.ctrlKey && !x.shiftKey && !x.altKey && !x.metaKey) { if ("`½²^º§ùµ°".indexOf(x.key) > -1) { bqm=1;d.body.classList.add('ngn_bq');pd(x); // ` or other trigger symbol pressed, wait for next key