show editor home on all files closing

pull/2464/head
Aniket-Engg 3 years ago
parent 4580757195
commit 38f99dcbc4
  1. 3
      apps/remix-ide/src/app/panels/layout.ts
  2. 2
      apps/remix-ide/src/app/panels/tab-proxy.js

@ -57,9 +57,6 @@ export class Layout extends Plugin {
this.panels.main.active = false this.panels.main.active = false
this.event.emit('change', null) this.event.emit('change', null)
}) })
this.on('tabs', 'tabCountChanged', async count => {
if (!count) await this.call('manager', 'activatePlugin', 'home')
})
this.on('manager', 'activate', (profile: Profile) => { this.on('manager', 'activate', (profile: Profile) => {
switch (profile.name) { switch (profile.name) {
case 'filePanel': case 'filePanel':

@ -284,7 +284,7 @@ export class TabProxy extends Plugin {
let previous = currentFileTab let previous = currentFileTab
this.loadedTabs = this.loadedTabs.filter((tab, index) => { this.loadedTabs = this.loadedTabs.filter((tab, index) => {
if (!previous && tab.name === name) { if (!previous && tab.name === name) {
if(index - 1 && this.loadedTabs[index - 1]) if(index - 1 >= 0 && this.loadedTabs[index - 1])
previous = this.loadedTabs[index - 1] previous = this.loadedTabs[index - 1]
else if (index + 1 && this.loadedTabs[index + 1]) else if (index + 1 && this.loadedTabs[index + 1])
previous = this.loadedTabs[index + 1] previous = this.loadedTabs[index + 1]

Loading…
Cancel
Save