Skip to content

Commit

Permalink
fix editor freezing on some snippets triggered by Tab (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
artisticat1 committed Oct 25, 2022
1 parent 46fb717 commit a54cbf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snippet_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class SnippetManager {

// Insert any tabstops
// Find the positions of the cursors in the new document
const changeSet = ChangeSet.of(changes, view.state.doc.length);
const changeSet = ChangeSet.of(changes, docLength);
const oldPositions = snippets.map(change => change.from);
const newPositions = oldPositions.map(pos => changeSet.mapPos(pos));

Expand Down

0 comments on commit a54cbf4

Please sign in to comment.