Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backtick backspace #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/tiolb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/tryapl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down