From dc1b888a3b5be5b55d06de749cef570cabe9abbc Mon Sep 17 00:00:00 2001 From: Andy Bunce Date: Fri, 22 Aug 2025 22:29:23 +0100 Subject: [PATCH] [fix] position off by one --- webapp/lsp/lsp-diags.xqm | 2 +- webapp/static/clients/codemirror/script.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/lsp/lsp-diags.xqm b/webapp/lsp/lsp-diags.xqm index 6f18ccb..53dacab 100644 --- a/webapp/lsp/lsp-diags.xqm +++ b/webapp/lsp/lsp-diags.xqm @@ -52,7 +52,7 @@ declare function lsp-diags:parse-error($text as xs:string, $xml as element(ERROR as map(*)*{ if(string-length($text) gt 0) - then let $last:= max((0,string-length($text)-1)) + then let $last:= string-length($text) let $dmesg:=$xml/string()=>trace("parse-error") let $dmesg:=translate($dmesg," ",";") let $b:=number($xml/@b)-1 diff --git a/webapp/static/clients/codemirror/script.js b/webapp/static/clients/codemirror/script.js index 37ed931..7d2281d 100644 --- a/webapp/static/clients/codemirror/script.js +++ b/webapp/static/clients/codemirror/script.js @@ -75,7 +75,7 @@ function connect() { const doc = view.state.doc.toString(); const state = lsp.createEditorState(doc, [...lsp.baseExts, extLsp, extLint, lsp.debouncedChangeListener({ - delay: 5000, + delay: 750, onChange: (content, state) => { console.log('Debounced change detected:'+content); client.sync();