Skip to content

Commit 3578f6b

Browse files
author
Lukas Petry
committed
Merge branch 'fix-14' into release
2 parents 645bae4 + 6175085 commit 3578f6b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ export default class Opener extends Plugin {
247247
// console.log('bruv');
248248
oldopenFile && oldopenFile.apply(leaf, [file, openState]);
249249
openElsewhere = true;
250+
// close potentially prepared empty leaf (fixes #14)
251+
if (leaf !== this && this.getViewState()?.type == 'empty') {
252+
this.detach();
253+
}
250254
// console.log("openElsewhere: ",openElsewhere);
251255
// return;
252256
}

0 commit comments

Comments
 (0)