Socket
Socket
Sign inDemoInstall

@codemirror/history

Package Overview
Dependencies
6
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.17.1 to 0.17.2

6

CHANGELOG.md

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

## 0.17.2 (2021-01-19)
### Bug fixes
Fix a bug where the history could get corrupted when the document length was reduced to zero. Fix another bad use of changes.length
## 0.17.1 (2021-01-06)

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

4

dist/index.js

@@ -45,3 +45,3 @@ import { Annotation, Facet, combineConfig, StateField, Transaction, StateEffect } from '@codemirror/state';

if (tr.annotation(Transaction.addToHistory) === false)
return tr.changes.length ? state.addMapping(tr.changes.desc) : state;
return !tr.changes.empty ? state.addMapping(tr.changes.desc) : state;
let event = HistEvent.fromTransaction(tr);

@@ -246,3 +246,3 @@ let time = tr.annotation(Transaction.time), userEvent = tr.annotation(Transaction.userEvent);

!lastEvent.selectionsAfter.length &&
lastEvent.changes.length && event.changes &&
!lastEvent.changes.empty && event.changes &&
isAdjacent(lastEvent.changes, event.changes)) {

@@ -249,0 +249,0 @@ done = updateBranch(done, done.length - 1, maxLen, new HistEvent(event.changes.compose(lastEvent.changes), conc(event.effects, lastEvent.effects), lastEvent.mapped, lastEvent.startSelection, none));

{
"name": "@codemirror/history",
"version": "0.17.1",
"version": "0.17.2",
"description": "Undo/redo history for the CodeMirror code editor",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc