Socket
Socket
Sign inDemoInstall

@codemirror/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
77
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.18.4 to 0.18.5

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## 0.18.5 (2021-04-23)
### Bug fixes
Fix a regression where snippet field selection didn't work with @codemirror/state 0.18.6.
Fix a bug where snippet fields with different position numbers were inappropriately merged.
## 0.18.4 (2021-04-20)

@@ -2,0 +10,0 @@

4

dist/index.d.ts
import { EditorState, Transaction, StateCommand, Facet, Extension } from '@codemirror/state';
import { EditorView, KeyBinding, Command } from '@codemirror/view';
import { NodeType } from 'lezer-tree';
import * as lezer_tree from 'lezer-tree';

@@ -127,3 +127,3 @@ interface CompletionConfig {

text: string;
type: NodeType;
type: lezer_tree.NodeType;
} | null;

@@ -130,0 +130,0 @@ /**

@@ -1033,3 +1033,3 @@ import { Facet, combineConfig, StateEffect, StateField, Transaction, Text, EditorSelection, Prec, CharCategory } from '@codemirror/state';

for (let i = 0; i < fields.length; i++) {
if (name ? fields[i].name == name : seq != null && fields[i].seq == seq)
if (seq != null ? fields[i].seq == seq : name ? fields[i].name == name : false)
found = i;

@@ -1043,2 +1043,5 @@ }

found = i;
for (let pos of positions)
if (pos.field >= found)
pos.field++;
}

@@ -1132,5 +1135,7 @@ positions.push(new FieldPos(found, lines.length, m.index, m.index + name.length));

if (ranges.length > 1) {
let effects = spec.effects = [setActive.of(new ActiveSnippet(ranges, 0))];
let active = new ActiveSnippet(ranges, 0);
let effects = spec.effects = [setActive.of(active)];
if (editor.state.field(snippetState, false) === undefined)
effects.push(StateEffect.appendConfig.of([snippetState, addSnippetKeymap, snippetPointerHandler, baseTheme]));
effects.push(StateEffect.appendConfig.of([snippetState.init(() => active), addSnippetKeymap,
snippetPointerHandler, baseTheme]));
}

@@ -1137,0 +1142,0 @@ editor.dispatch(editor.state.update(spec));

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

@@ -5,0 +5,0 @@ "scripts": {

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