onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.83k stars 282 forks source link

Launching Oni2 via the CLI results in multiple instances of Oni2 running on macOS #2617

Open dcalhoun opened 4 years ago

dcalhoun commented 4 years ago

Steps to Reproduce

  1. Open your terminal.
  2. oni2 .
  3. cd ~/Downloads (or any directory)
  4. oni2 --new .

or

  1. Open your terminal.
  2. oni2 .
  3. oni2 --new .

Expected Result

Actual Result

image

Environment

kinglouie commented 4 years ago

related #1250

crdant commented 3 years ago

I see a link to #1250 here, and see that issue is "fixed" but this issue persists. Is this one still being worked? This behavior is spawning multiple application instances is the most frustrating thing about using onivim.

CrossR commented 3 years ago

I see a link to #1250 here, and see that issue is "fixed" but this issue persists. Is this one still being worked? This behavior is spawning multiple application instances is the most frustrating thing about using onivim.

Are you on a recent version of Oni2? On macOS, if I run oni2 file1, oni2 file2, oni2 file3, I'll just get one instance of Oni2, with three files open.

Or do you perhaps mean some other way of launching Oni2 where multiple instances still spawn?

(If anyone comes across this looking how to force multiple instances, there is the -n/--new flag to force multiple windows).

dcalhoun commented 3 years ago

Are you on a recent version of Oni2?

@CrossR I can reproduce all of my original post using Version 0.5.9-nightly (0.5.2154), but it requires using the --new flag that has since been added. So, the context has changed some.

On macOS, if I run oni2 file1, oni2 file2, oni2 file3, I'll just get one instance of Oni2, with three files open.

Or do you perhaps mean some other way of launching Oni2 where multiple instances still spawn?

(If anyone comes across this looking how to force multiple instances, there is the -n/--new flag to force multiple windows).

Here are the new steps to reproduce the issues. Happy to update my original post to reflect the changes from the --new flag that was introduced.

  1. Open your terminal.
  2. oni2 .
  3. cd ~/Downloads (or any directory)
  4. oni2 -n .

or

  1. Open your terminal.
  2. oni2 .
  3. oni2 -n .

Expected: The are two Oni windows running in the same Oni instance. I.e. there is one Oni icon in the macOS Dock.

Actual: There are two Oni instances running. I.e. there are two Oni icons in the macOS Dock.