@codemirror/autocomplete 0.19.6 → 0.19.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.19.7 (2021-11-16)
2
+
3
+ ### Bug fixes
4
+
5
+ Make option deduplication less aggressive, so that options with different `type` or `apply` fields don't get merged.
6
+
1
7
  ## 0.19.6 (2021-11-12)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -570,7 +570,8 @@ function sortOptions(active, state) {
570
570
  for (let opt of options.sort(cmpOption)) {
571
571
  if (result.length == MaxOptions)
572
572
  break;
573
- if (!prev || prev.label != opt.completion.label || prev.detail != opt.completion.detail)
573
+ if (!prev || prev.label != opt.completion.label || prev.detail != opt.completion.detail ||
574
+ prev.type != opt.completion.type || prev.apply != opt.completion.apply)
574
575
  result.push(opt);
575
576
  else if (score(opt.completion) > score(prev))
576
577
  result[result.length - 1] = opt;
package/dist/index.js CHANGED
@@ -566,7 +566,8 @@ function sortOptions(active, state) {
566
566
  for (let opt of options.sort(cmpOption)) {
567
567
  if (result.length == MaxOptions)
568
568
  break;
569
- if (!prev || prev.label != opt.completion.label || prev.detail != opt.completion.detail)
569
+ if (!prev || prev.label != opt.completion.label || prev.detail != opt.completion.detail ||
570
+ prev.type != opt.completion.type || prev.apply != opt.completion.apply)
570
571
  result.push(opt);
571
572
  else if (score(opt.completion) > score(prev))
572
573
  result[result.length - 1] = opt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/autocomplete",
3
- "version": "0.19.6",
3
+ "version": "0.19.7",
4
4
  "description": "Autocompletion for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",