@codemirror/autocomplete 6.20.1 → 6.20.2

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.20.2 (2026-05-06)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix an issue where you couldn't move to the last page of completions when its count was a precise multiple of the page size.
6
+
1
7
  ## 6.20.1 (2026-03-02)
2
8
 
3
9
  ### Bug fixes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @codemirror/autocomplete [![NPM version](https://img.shields.io/npm/v/@codemirror/autocomplete.svg)](https://www.npmjs.org/package/@codemirror/autocomplete)
2
2
 
3
- [ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#autocomplete) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/autocomplete/blob/main/CHANGELOG.md) ]
3
+ [ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#autocomplete) | [**ISSUES**](https://code.haverbeke.berlin/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/) | [**CHANGELOG**](https://code.haverbeke.berlin/codemirror/autocomplete/src/branch/main/CHANGELOG.md) ]
4
4
 
5
5
  This package implements autocompletion for the
6
6
  [CodeMirror](https://codemirror.net/) code editor.
@@ -10,7 +10,7 @@ number of [examples](https://codemirror.net/examples/) and the
10
10
  [documentation](https://codemirror.net/docs/).
11
11
 
12
12
  This code is released under an
13
- [MIT license](https://github.com/codemirror/autocomplete/tree/main/LICENSE).
13
+ [MIT license](https://code.haverbeke.berlin/codemirror/autocomplete/tree/main/LICENSE).
14
14
 
15
15
  We aim to be an inclusive, welcoming community. To make that explicit,
16
16
  we have a [code of
package/dist/index.cjs CHANGED
@@ -497,8 +497,8 @@ function rangeAroundSelected(total, selected, max) {
497
497
  let off = Math.floor(selected / max);
498
498
  return { from: off * max, to: (off + 1) * max };
499
499
  }
500
- let off = Math.floor((total - selected) / max);
501
- return { from: total - (off + 1) * max, to: total - off * max };
500
+ let off = Math.ceil((total - selected) / max);
501
+ return { from: total - off * max, to: total - (off - 1) * max };
502
502
  }
503
503
  class CompletionTooltip {
504
504
  constructor(view, stateField, applyCompletion) {
@@ -1357,7 +1357,8 @@ const baseTheme = view.EditorView.baseTheme({
1357
1357
  content: '"···"',
1358
1358
  opacity: 0.5,
1359
1359
  display: "block",
1360
- textAlign: "center"
1360
+ textAlign: "center",
1361
+ cursor: "pointer",
1361
1362
  },
1362
1363
  ".cm-tooltip.cm-completionInfo": {
1363
1364
  position: "absolute",
package/dist/index.js CHANGED
@@ -495,8 +495,8 @@ function rangeAroundSelected(total, selected, max) {
495
495
  let off = Math.floor(selected / max);
496
496
  return { from: off * max, to: (off + 1) * max };
497
497
  }
498
- let off = Math.floor((total - selected) / max);
499
- return { from: total - (off + 1) * max, to: total - off * max };
498
+ let off = Math.ceil((total - selected) / max);
499
+ return { from: total - off * max, to: total - (off - 1) * max };
500
500
  }
501
501
  class CompletionTooltip {
502
502
  constructor(view, stateField, applyCompletion) {
@@ -1355,7 +1355,8 @@ const baseTheme = /*@__PURE__*/EditorView.baseTheme({
1355
1355
  content: '"···"',
1356
1356
  opacity: 0.5,
1357
1357
  display: "block",
1358
- textAlign: "center"
1358
+ textAlign: "center",
1359
+ cursor: "pointer",
1359
1360
  },
1360
1361
  ".cm-tooltip.cm-completionInfo": {
1361
1362
  position: "absolute",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/autocomplete",
3
- "version": "6.20.1",
3
+ "version": "6.20.2",
4
4
  "description": "Autocompletion for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",
@@ -36,6 +36,6 @@
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
39
- "url": "git+https://github.com/codemirror/autocomplete.git"
39
+ "url": "git+https://code.haverbeke.berlin/codemirror/autocomplete.git"
40
40
  }
41
41
  }
@@ -1,16 +0,0 @@
1
- name: Trigger CI
2
- on: push
3
-
4
- jobs:
5
- build:
6
- name: Dispatch to main repo
7
- runs-on: ubuntu-latest
8
- steps:
9
- - name: Emit repository_dispatch
10
- uses: mvasigh/dispatch-action@main
11
- with:
12
- # You should create a personal access token and store it in your repository
13
- token: ${{ secrets.DISPATCH_AUTH }}
14
- repo: dev
15
- owner: codemirror
16
- event_type: push