@codemirror/autocomplete 6.7.0 → 6.7.1

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
+ ## 6.7.1 (2023-05-13)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a bug that cause incorrect ordering of completions when some results covered input text and others didn't.
6
+
1
7
  ## 6.7.0 (2023-05-11)
2
8
 
3
9
  ### New features
package/dist/index.cjs CHANGED
@@ -220,7 +220,7 @@ class FuzzyMatcher {
220
220
  // is. See `Penalty` above.
221
221
  match(word) {
222
222
  if (this.pattern.length == 0)
223
- return [0];
223
+ return [-100 /* Penalty.NotFull */];
224
224
  if (word.length < this.pattern.length)
225
225
  return null;
226
226
  let { chars, folded, any, precise, byWord } = this;
package/dist/index.js CHANGED
@@ -216,7 +216,7 @@ class FuzzyMatcher {
216
216
  // is. See `Penalty` above.
217
217
  match(word) {
218
218
  if (this.pattern.length == 0)
219
- return [0];
219
+ return [-100 /* Penalty.NotFull */];
220
220
  if (word.length < this.pattern.length)
221
221
  return null;
222
222
  let { chars, folded, any, precise, byWord } = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/autocomplete",
3
- "version": "6.7.0",
3
+ "version": "6.7.1",
4
4
  "description": "Autocompletion for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",