From 542162c78aed8db11eaea67f54e124854824dd4f Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 28 Jan 2024 20:59:46 +0000 Subject: [PATCH] One editor at a time. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4810 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/client.js b/core/client.js index 59ed4e6d..6ffc0ed3 100644 --- a/core/client.js +++ b/core/client.js @@ -435,8 +435,10 @@ async function edit() { document.getElementById('viewPane').style.display = is_edit_only() ? 'none' : 'flex'; try { - cm6 = await import('/codemirror/cm6.js'); - gEditor = cm6.TildeFriendsEditorView(document.getElementById("editor")); + if (!gEditor) { + cm6 = await import('/codemirror/cm6.js'); + gEditor = cm6.TildeFriendsEditorView(document.getElementById("editor")); + } gEditor.onDocChange = updateFiles; await load(); } catch (error) {