Skip to content

Commit

Permalink
Merge pull request #122 from CodinGame/lmn/fix-lock-code
Browse files Browse the repository at this point in the history
fix: properly restore model on editor disposal
  • Loading branch information
CGNonofr authored Nov 7, 2024
2 parents a303d8c + 16c4a24 commit 2d13a96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export function lockCodeWithoutDecoration (
}
disposableStore.add(editor.onDidChangeModel(lockModel))
lockModel()
disposableStore.add(editor.onDidDispose(() => restoreModel?.()))

// Handle selection of the last line of an editable range
disposableStore.add(
Expand Down

0 comments on commit 2d13a96

Please sign in to comment.