From 7bea0397e9b9f27b80ecd02e99b7102eb98a9767 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 23 Jan 2022 02:20:57 +0300 Subject: [PATCH] rename preference to autosaveDraft --- edit/drafts.js | 2 +- js/prefs.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/edit/drafts.js b/edit/drafts.js index e464a753..9c4bd335 100644 --- a/edit/drafts.js +++ b/edit/drafts.js @@ -25,7 +25,7 @@ debounce(updateDraft, isDirty ? delay : 0); }); - prefs.subscribe('editor.autosaveDelay', (key, val) => { + prefs.subscribe('editor.autosaveDraft', (key, val) => { delay = clamp(val * 1000 | 0, 1000, 2 ** 32 - 1); const t = debounce.timers.get(updateDraft); if (t != null) debounce(updateDraft, t ? delay : 0); diff --git a/js/prefs.js b/js/prefs.js index 693c1fab..cceae0a3 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -99,7 +99,7 @@ 'editor.selectByTokens': true, 'editor.appliesToLineWidget': true, // show applies-to line widget on the editor - 'editor.autosaveDelay': 10, // seconds + 'editor.autosaveDraft': 10, // seconds 'editor.livePreview': true, // show CSS colors as clickable colored rectangles