Compare commits
2 Commits
954827a0d6
...
ab73f22dc5
| Author | SHA1 | Date |
|---|---|---|
|
|
ab73f22dc5 | |
|
|
04e5d57a22 |
|
|
@ -210,10 +210,13 @@ export class OpenFile implements WorkspaceFile {
|
|||
private changeSet: ChangeSet;
|
||||
get changes(): ChangeSet {
|
||||
if (!this.changeSet) {
|
||||
this.changeSet = ChangeSet.empty(this.rootState.val.doc.length);
|
||||
this.clearChanges();
|
||||
}
|
||||
return this.changeSet;
|
||||
}
|
||||
clearChanges(): void {
|
||||
this.changeSet = ChangeSet.empty(this.rootState.val.doc.length);
|
||||
}
|
||||
|
||||
// Return an EditorView to be used by the LSP Workspace for position mapping.
|
||||
// If `main` is provided and belongs to this open file, return it. Otherwise
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@ import * as u from "./utils";
|
|||
|
||||
const folderTreeState = van.state<FolderTree | null>(null);
|
||||
|
||||
van.derive(() => {
|
||||
if (folderTreeState.val) {
|
||||
document.title = folderTreeState.val.path + " - Miller code editor";
|
||||
}
|
||||
});
|
||||
|
||||
async function openFolder() {
|
||||
const folderTree = await window.electronAPI.openFolder().catch(alert);
|
||||
if (!folderTree) return;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class OpenFileWorkspace extends Workspace {
|
|||
result.push({ file, prevDoc, changes });
|
||||
file.doc = file.rootState.val.doc;
|
||||
file.version = this.nextFileVersion(file.uri);
|
||||
file.changes = ChangeSet.empty(file.doc.length);
|
||||
file.clearChanges();
|
||||
}
|
||||
for (const e of file.editors) {
|
||||
const plugin = LSPPlugin.get(e.view);
|
||||
|
|
|
|||
Loading…
Reference in New Issue