@rohal12/spindle-lsp 0.15.36 → 0.15.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -55,7 +55,7 @@ var VERSION;
55
55
  var init_version = __esm({
56
56
  "src/version.ts"() {
57
57
  "use strict";
58
- VERSION = false ? pkg.version : "0.15.36";
58
+ VERSION = false ? pkg.version : "0.15.37";
59
59
  }
60
60
  });
61
61
 
@@ -33812,9 +33812,6 @@ var init_widget_registry = __esm({
33812
33812
  });
33813
33813
 
33814
33814
  // src/core/markup/markup-index.ts
33815
- function sameHeaders(a, b) {
33816
- return a.length === b.length && a.every((p, i2) => p === b[i2]);
33817
- }
33818
33815
  var MarkupIndex;
33819
33816
  var init_markup_index = __esm({
33820
33817
  "src/core/markup/markup-index.ts"() {
@@ -33833,10 +33830,10 @@ var init_markup_index = __esm({
33833
33830
  if (text3 === void 0) return void 0;
33834
33831
  const kept3 = this.cache.get(uri);
33835
33832
  const passages = this.sources.passages(uri);
33836
- if (kept3 && kept3.text === text3 && sameHeaders(kept3.passages.map((p) => p.passage), passages)) return kept3;
33833
+ if (kept3 && kept3.markup.text === text3 && (kept3.headers === passages || kept3.headers.length === 0 && passages.length === 0)) return kept3.markup;
33837
33834
  this.context ??= this.sources.context();
33838
33835
  const fresh = new DocumentMarkup(uri, text3, passages, this.context);
33839
- this.cache.set(uri, fresh);
33836
+ this.cache.set(uri, { markup: fresh, headers: passages });
33840
33837
  return fresh;
33841
33838
  }
33842
33839
  /** The macros or widgets changed: every document's markup is read again on demand. */