Mercurial > obsidian-remember-file-state
annotate src/main.ts @ 10:a58b0f1fae42
Added tag 1.0.2 for changeset d2741019e3b9
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 14 Feb 2022 13:03:01 -0800 |
parents | ec6c48a07b03 |
children | 6f7f35af6335 |
rev | line source |
---|---|
0 | 1 import { |
2 Editor, | |
3 MarkdownView, | |
4 OpenViewState, | |
5 Plugin, | |
6 View | |
7 } from 'obsidian'; | |
8 | |
9 import { | |
2 | 10 EditorState, |
0 | 11 EditorSelection |
12 } from '@codemirror/state'; | |
13 | |
14 import { | |
15 around | |
16 } from 'monkey-around'; | |
17 | |
18 import { | |
19 DEFAULT_SETTINGS, | |
20 RememberFileStatePluginSettings, | |
21 RememberFileStatePluginSettingTab | |
22 } from './settings'; | |
23 | |
24 // Interface for a file state. | |
25 interface RememberedFileState { | |
26 path: string; | |
27 lastSavedTime: number; | |
28 stateData: Object; | |
29 } | |
30 | |
31 // Interface for all currently remembered file states. | |
32 interface RememberFileStatePluginData { | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
33 rememberedFiles: Object; |
0 | 34 } |
35 | |
36 // Default empty list of remembered file states. | |
37 const DEFAULT_DATA: RememberFileStatePluginData = { | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
38 rememberedFiles: {} |
0 | 39 }; |
40 | |
41 export default class RememberFileStatePlugin extends Plugin { | |
42 settings: RememberFileStatePluginSettings; | |
43 data: RememberFileStatePluginData; | |
44 | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
45 // Don't restore state on the next file being opened. |
0 | 46 private _suppressNextFileOpen: boolean = false; |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
47 // Next unique ID to identify views without keeping references to them. |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
48 private _nextUniqueViewId: number = 0; |
0 | 49 |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
50 // Functions to unregister any monkey-patched view hooks on plugin unload. |
0 | 51 private _viewUninstallers = {}; |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
52 // Functions to unregister any global callbacks on plugin unload. |
0 | 53 private _globalUninstallers = []; |
54 | |
55 async onload() { | |
56 console.log("Loading RememberFileState plugin"); | |
57 | |
58 await this.loadSettings(); | |
59 | |
60 this.data = Object.assign({}, DEFAULT_DATA); | |
61 | |
62 this.registerEvent(this.app.workspace.on('file-open', this.onFileOpen)); | |
63 this.registerEvent(this.app.vault.on('rename', this.onFileRename)); | |
64 this.registerEvent(this.app.vault.on('delete', this.onFileDelete)); | |
65 | |
66 this.app.workspace.getLeavesOfType("markdown").forEach( | |
67 (leaf) => { this.registerOnUnloadFile(leaf.view); }); | |
68 | |
69 const _this = this; | |
70 var uninstall = around(this.app.workspace, { | |
71 openLinkText: function(next) { | |
72 return async function( | |
73 linktext: string, sourcePath: string, | |
74 newLeaf?: boolean, openViewState?: OpenViewState) { | |
75 // When opening a link, we don't want to restore the | |
76 // scroll position/selection/etc because there's a | |
77 // good chance we want to show the file back at the | |
78 // top, or we're going straight to a specific block. | |
79 _this._suppressNextFileOpen = true; | |
80 return await next.call( | |
81 this, linktext, sourcePath, newLeaf, openViewState); | |
82 }; | |
83 } | |
84 }); | |
85 this._globalUninstallers.push(uninstall); | |
86 | |
87 this.addSettingTab(new RememberFileStatePluginSettingTab(this.app, this)); | |
88 } | |
89 | |
90 onunload() { | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
91 // Run view uninstallers on all current views. |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
92 var numViews: number = 0; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
93 this.app.workspace.getLeavesOfType("markdown").forEach( |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
94 (leaf) => { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
95 const filePath = leaf.view.file.path; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
96 const viewId = this.getUniqueViewId(leaf.view); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
97 if (viewId != undefined) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
98 var uninstaller = this._viewUninstallers[viewId]; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
99 if (uninstaller) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
100 console.debug(`Uninstalling hooks for view ${viewId}`, filePath); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
101 uninstaller(leaf.view); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
102 ++numViews; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
103 } else { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
104 console.debug("Found markdown view without an uninstaller!", filePath); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
105 } |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
106 // Clear the ID so we don't get confused if the plugin |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
107 // is re-enabled later. |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
108 this.clearUniqueViewId(leaf.view); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
109 } else { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
110 console.debug("Found markdown view without an ID!", filePath); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
111 } |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
112 }); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
113 console.debug(`Unregistered ${numViews} view callbacks`); |
0 | 114 this._viewUninstallers = {}; |
115 | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
116 // Run global unhooks. |
0 | 117 this._globalUninstallers.forEach((cb) => cb()); |
118 } | |
119 | |
120 async loadSettings() { | |
121 this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); | |
122 } | |
123 | |
124 async saveSettings() { | |
125 await this.saveData(this.settings); | |
126 } | |
127 | |
128 private readonly registerOnUnloadFile = function(view) { | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
129 var filePath = view.file.path; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
130 var viewId = this.getUniqueViewId(view, true); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
131 if (viewId in this._viewUninstallers) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
132 console.debug(`View ${viewId} is already registered`, filePath); |
0 | 133 return; |
134 } | |
135 | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
136 console.debug(`Registering callback on view ${viewId}`, filePath); |
0 | 137 const _this = this; |
138 var uninstall = around(view, { | |
139 onUnloadFile: function(next) { | |
140 return async function (unloaded: TFile) { | |
141 _this.rememberFileState(unloaded, view); | |
142 return await next.call(this, unloaded); | |
143 }; | |
144 } | |
145 }); | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
146 this._viewUninstallers[viewId] = uninstall; |
0 | 147 |
148 view.register(() => { | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
149 // Don't hold a reference to this plugin here because this callback |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
150 // will outlive it if it gets deactivated. So let's find it, and |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
151 // do nothing if we don't find it. |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
152 var plugin = app.plugins.getPlugin("remember-file-state"); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
153 if (plugin) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
154 console.debug(`Unregistering view ${viewId} callback`, filePath); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
155 delete plugin._viewUninstallers[viewId]; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
156 uninstall(); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
157 } else { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
158 console.debug( |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
159 "Plugin remember-file-state has been unloaded, ignoring unregister"); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
160 } |
0 | 161 }); |
162 } | |
163 | |
164 private readonly onFileOpen = async ( | |
165 openedFile: TFile | |
166 ): Promise<void> => { | |
167 // If `openedFile` is null, it's because the last pane was closed | |
168 // and there is now an empty pane. | |
169 if (openedFile) { | |
2 | 170 var activeView = this.app.workspace.getActiveViewOfType(MarkdownView); |
7
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
171 if (activeView) { |
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
172 this.registerOnUnloadFile(activeView); |
0 | 173 |
7
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
174 if (!this._suppressNextFileOpen) { |
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
175 this.restoreFileState(openedFile, activeView); |
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
176 } |
0 | 177 } |
7
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
178 // else: the file isn't handled by a markdown editor. |
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
179 |
b1cb0474bb18
Fix possible crash when an opened file isn't a markdown file
Ludovic Chabant <ludovic@chabant.com>
parents:
6
diff
changeset
|
180 this._suppressNextFileOpen = false; |
0 | 181 } |
182 } | |
183 | |
184 private readonly rememberFileState = async (file: TFile, view: View): Promise<void> => { | |
185 const scrollInfo = view.editor.getScrollInfo(); | |
186 const stateSelectionJSON = view.editor.cm.state.selection.toJSON(); | |
187 const stateData = {'scrollInfo': scrollInfo, 'selection': stateSelectionJSON}; | |
188 | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
189 var existingFile = this.data.rememberedFiles[file.path]; |
0 | 190 if (existingFile) { |
191 existingFile.lastSavedTime = Date.now(); | |
192 existingFile.stateData = stateData; | |
193 } else { | |
194 let newFileState = { | |
195 path: file.path, | |
196 lastSavedTime: Date.now(), | |
197 stateData: stateData | |
198 }; | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
199 this.data.rememberedFiles[file.path] = newFileState; |
0 | 200 |
201 // If we need to keep the number remembered files under a maximum, | |
202 // do it now. | |
203 this.forgetExcessFiles(); | |
204 } | |
205 console.debug("Remember file state for:", file.path); | |
206 } | |
207 | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
208 private readonly restoreFileState = function(file: TFile, view: View) { |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
209 const existingFile = this.data.rememberedFiles[file.path]; |
0 | 210 if (existingFile) { |
211 console.debug("Restoring file state for:", file.path); | |
212 const stateData = existingFile.stateData; | |
213 view.editor.scrollTo(stateData.scrollInfo.left, stateData.scrollInfo.top); | |
2 | 214 var transaction = view.editor.cm.state.update({ |
215 selection: EditorSelection.fromJSON(stateData.selection)}) | |
216 view.editor.cm.dispatch(transaction); | |
0 | 217 } |
218 } | |
219 | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
220 private readonly forgetExcessFiles = function() { |
0 | 221 const keepMax = this.settings.rememberMaxFiles; |
222 if (keepMax <= 0) { | |
223 return; | |
224 } | |
225 | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
226 // Sort newer files first, older files last. |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
227 var filesData = Object.values(this.data.rememberedFiles); |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
228 filesData.sort((a, b) => { |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
229 if (a.lastSavedTime > b.lastSavedTime) return -1; // a before b |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
230 if (a.lastSavedTime < b.lastSavedTime) return 1; // b before a |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
231 return 0; |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
232 }); |
0 | 233 |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
234 // Remove older files past the limit. |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
235 for (var i = keepMax; i < filesData.length; ++i) { |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
236 var fileData = filesData[i]; |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
237 delete this.data.rememberedFiles[fileData.path]; |
0 | 238 } |
239 } | |
240 | |
6
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
241 private readonly getUniqueViewId = function(view: View, autocreateId: boolean = false) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
242 if (view.__uniqueId == undefined) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
243 if (!autocreateId) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
244 return -1; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
245 } |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
246 view.__uniqueId = (this._nextUniqueViewId++); |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
247 return view.__uniqueId; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
248 } |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
249 return view.__uniqueId; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
250 } |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
251 |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
252 private readonly clearUniqueViewId = function(view: View) { |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
253 delete view["__uniqueId"]; |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
254 } |
114d7e6d2633
Fix various issues around keeping references to editor objects
Ludovic Chabant <ludovic@chabant.com>
parents:
2
diff
changeset
|
255 |
0 | 256 private readonly onFileRename = async ( |
257 file: TAbstractFile, | |
258 oldPath: string, | |
259 ): Promise<void> => { | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
260 const existingFile = this.data.rememberedFiles[oldPath]; |
0 | 261 if (existingFile) { |
262 existingFile.path = file.path; | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
263 delete this.data.rememberedFiles[oldPath]; |
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
264 this.data.rememberedFiles[file.path] = existingFile; |
0 | 265 } |
266 }; | |
267 | |
268 private readonly onFileDelete = async ( | |
269 file: TAbstractFile, | |
270 ): Promise<void> => { | |
8
ec6c48a07b03
Make the plugin data into a dictionary
Ludovic Chabant <ludovic@chabant.com>
parents:
7
diff
changeset
|
271 delete this.data.rememberedFiles[file.path]; |
0 | 272 }; |
273 } | |
274 |