From 87b499c3825d4465c740759db0b312548f5349bf Mon Sep 17 00:00:00 2001 From: swk777 Date: Tue, 22 Oct 2024 12:06:04 +0800 Subject: [PATCH 1/2] Fix undo/redo history affecting multiple files after switching in CodeMirror. --- packages/web/src/components/apps/editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/components/apps/editor.tsx b/packages/web/src/components/apps/editor.tsx index 1dd5ad0e..5f2ac8df 100644 --- a/packages/web/src/components/apps/editor.tsx +++ b/packages/web/src/components/apps/editor.tsx @@ -25,7 +25,7 @@ export function CodeEditor({ const extensions = languageExtension ? [languageExtension] : []; return ( - + ); } From 9be702d02f88ce81c198634629001d68667900eb Mon Sep 17 00:00:00 2001 From: swk777 Date: Tue, 22 Oct 2024 12:14:16 +0800 Subject: [PATCH 2/2] add changeset --- .changeset/short-tigers-itch.md | 5 +++++ packages/web/src/components/apps/editor.tsx | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/short-tigers-itch.md diff --git a/.changeset/short-tigers-itch.md b/.changeset/short-tigers-itch.md new file mode 100644 index 00000000..d44bff8d --- /dev/null +++ b/.changeset/short-tigers-itch.md @@ -0,0 +1,5 @@ +--- +'@srcbook/web': patch +--- + +Fix undo/redo history affecting multiple files after switching in codeMirror diff --git a/packages/web/src/components/apps/editor.tsx b/packages/web/src/components/apps/editor.tsx index 5f2ac8df..bf77eeef 100644 --- a/packages/web/src/components/apps/editor.tsx +++ b/packages/web/src/components/apps/editor.tsx @@ -25,7 +25,13 @@ export function CodeEditor({ const extensions = languageExtension ? [languageExtension] : []; return ( - + ); }