diff --git a/src/actions/openAction.ts b/src/actions/openAction.ts index 0a2c1ae..6ee28e0 100644 --- a/src/actions/openAction.ts +++ b/src/actions/openAction.ts @@ -66,8 +66,8 @@ class OpenActionContext { const notifiers: Notifier.Cell[] = []; if (earlyQuit) await this.explorer.tryQuitOnOpen(); else notifiers.push(await this.quitOnOpenNotifier()); - const wins = await this.nvim.windows; - const resizeIt = wins.length === 1; + const lastWinnr = await this.nvim.call('winnr', ['$']); + const resizeIt = lastWinnr === 1; this.nvim.pauseNotification(); callback(); Notifier.notifyAll(notifiers);