Socket
Socket
Sign inDemoInstall

@codemirror/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/autocomplete - npm Package Compare versions

Comparing version 0.19.11 to 0.19.12

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.19.12 (2022-01-11)
### Bug fixes
Fix completion navigation with PageUp/Down when the completion tooltip isn't part of the view DOM.
## 0.19.11 (2022-01-11)

@@ -2,0 +8,0 @@

7

dist/index.js
import { Annotation, Facet, combineConfig, StateEffect, StateField, Prec, EditorSelection, Text } from '@codemirror/state';
import { Direction, logException, EditorView, ViewPlugin, Decoration, WidgetType, keymap } from '@codemirror/view';
import { showTooltip } from '@codemirror/tooltip';
import { showTooltip, getTooltip } from '@codemirror/tooltip';
import { syntaxTree, indentUnit } from '@codemirror/language';

@@ -781,4 +781,5 @@ import { codePointAt, codePointSize, fromCodePoint } from '@codemirror/text';

let step = 1, tooltip;
if (by == "page" && (tooltip = view.dom.querySelector(".cm-tooltip-autocomplete")))
step = Math.max(2, Math.floor(tooltip.offsetHeight / tooltip.querySelector("li").offsetHeight) - 1);
if (by == "page" && (tooltip = getTooltip(view, cState.open.tooltip)))
step = Math.max(2, Math.floor(tooltip.dom.offsetHeight /
tooltip.dom.querySelector("li").offsetHeight) - 1);
let selected = cState.open.selected + step * (forward ? 1 : -1), { length } = cState.open.options;

@@ -785,0 +786,0 @@ if (selected < 0)

{
"name": "@codemirror/autocomplete",
"version": "0.19.11",
"version": "0.19.12",
"description": "Autocompletion for the CodeMirror code editor",

@@ -32,3 +32,3 @@ "scripts": {

"@codemirror/text": "^0.19.2",
"@codemirror/tooltip": "^0.19.0",
"@codemirror/tooltip": "^0.19.12",
"@codemirror/view": "^0.19.0",

@@ -35,0 +35,0 @@ "@lezer/common": "^0.15.0"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc