MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / doCloseFile

Method doCloseFile

tools/xsbug/main.js:435–449  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

433 }
434 }
435 doCloseFile() {
436 let items = this.history.items;
437 if (items.length) {
438 let item = items.shift();
439 this.path = item.path;
440 this.state = item.state;
441 application.distribute("onHistoryChanged");
442 }
443 else {
444 this.path = undefined;
445 this.state = undefined;
446 }
447 this.doOpenView();
448 application.distribute("onPathChanged", this.path);
449 }
450 doCloseFiles() {
451 let items = this.history.items;
452 items.length = 0;

Callers 2

onDirectoryChangedMethod · 0.80
mapFileMethod · 0.80

Calls 2

doOpenViewMethod · 0.95
distributeMethod · 0.80

Tested by

no test coverage detected