[mod] update
This commit is contained in:
parent
ddd772f563
commit
cd369cd51e
11 changed files with 429 additions and 220 deletions
|
|
@ -211,8 +211,9 @@
|
|||
value="https://raw.githubusercontent.com/Quodatum/xqdoca/refs/heads/master/src/main/lib/model.xqm">
|
||||
model.xqm (Quodatum/xqdoca)</option>
|
||||
<option
|
||||
value="https://git.quodatum.duckdns.org/api/v1/repos/quodatum/basex-lsp/raw/webapp/lsp/lsp-text.xqm">
|
||||
lsp-text.xqm (quodatum/basex-lsp FORGEIO)</option>
|
||||
value="https://git.quodatum.duckdns.org/api/v1/repos/quodatum/basex-lsp/raw/webapp/lsp/set.xqm">
|
||||
set.xqm (quodatum/basex-lsp FORGEIO)</option>
|
||||
|
||||
<option
|
||||
value="https://raw.githubusercontent.com/dnovatchev/Articles/refs/heads/main/Generators/Code/generator.xq">
|
||||
generator.xquery</option>
|
||||
|
|
|
|||
|
|
@ -16684,7 +16684,7 @@ var lsp = (function (exports) {
|
|||
diagnostics = diagnosticFilter(diagnostics, state);
|
||||
let sorted = diagnostics.slice().sort((a, b) => a.from - b.from || a.to - b.to);
|
||||
let deco = new RangeSetBuilder(), active = [], pos = 0;
|
||||
let scan = state.doc.iter(), scanPos = 0;
|
||||
let scan = state.doc.iter(), scanPos = 0, docLen = state.doc.length;
|
||||
for (let i = 0;;) {
|
||||
let next = i == sorted.length ? null : sorted[i];
|
||||
if (!next && !active.length)
|
||||
|
|
@ -16696,6 +16696,8 @@ var lsp = (function (exports) {
|
|||
}
|
||||
else {
|
||||
from = next.from;
|
||||
if (from > docLen)
|
||||
break;
|
||||
to = next.to;
|
||||
active.push(next);
|
||||
i++;
|
||||
|
|
@ -16712,8 +16714,9 @@ var lsp = (function (exports) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
to = Math.min(to, docLen);
|
||||
let widget = false;
|
||||
if (active.some(d => d.from == from && d.to == to)) {
|
||||
if (active.some(d => d.from == from && (d.to == to || to == docLen))) {
|
||||
widget = from == to;
|
||||
if (!widget && to - from < 10) {
|
||||
let behind = from - (scanPos + scan.value.length);
|
||||
|
|
@ -16750,6 +16753,8 @@ var lsp = (function (exports) {
|
|||
}));
|
||||
}
|
||||
pos = to;
|
||||
if (pos == docLen)
|
||||
break;
|
||||
for (let i = 0; i < active.length; i++)
|
||||
if (active[i].to <= pos)
|
||||
active.splice(i--, 1);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue