Skip to content

With multiple windows open, --reuse-window picks the wrong one #2492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
danopia opened this issue Dec 19, 2020 · 1 comment
Closed

With multiple windows open, --reuse-window picks the wrong one #2492

danopia opened this issue Dec 19, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@danopia
Copy link

danopia commented Dec 19, 2020

Hello, I am using the feature from #164 added in v3.5.0 to allow opening files into existing code-server windows from the code-server terminal.

Unfortunately, it seems as though the feature always uses a 'first' window as the target. If multiple windows are opened from the same code-server, presumably to different workspaces, the command opens the file in the 'wrong' window. As shown here:

  1. First invocation is for a file in workspace (via absolute path): opens in this first window, and the file is also selected in file tree
  2. Second invocation is for a different file in a second workspace: still opens in the first window, and now the file is also not in that file tree to be selected.

The second invocation should instead be opening code-server in the second window.

code-server.multiple.window.reuse.mp4

Additionally, I've noticed that closing the first window breaks the command completely in the second window:

> code-server --reuse-window ./README.md
[2020-12-19T13:45:57.339Z] error got error from VS Code {"error":{"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"/tmp/vscode-ipc-b4540ccb-b7ea-45e0-b7fb-c86c9a6dfb54.sock"}}

# there's other sockets still...
> ls -l /tmp/vscode-ipc-*
srwxr-xr-x. 1 abc abc 0 Dec 19 13:32 /tmp/vscode-ipc-03009dc7-38f2-434b-8ae6-4d015c338115.sock=
srwxr-xr-x. 1 abc abc 0 Dec 19 14:27 /tmp/vscode-ipc-49e3d80a-572c-4b96-a127-bd1fa8241dd7.sock=
srwxr-xr-x. 1 abc abc 0 Dec 19 14:46 /tmp/vscode-ipc-6ffdbe22-5221-437c-a9c4-385c72f46991.sock=

So it seems more that the code-server command is only working with one window's socket overall.

  • Web Browser: Google Chrome | 87.0.4280.109 (Official Build) (64-bit)
  • Local OS: Chromebook, as above
  • Remote OS: Ubuntu 18.04.5 LTS (docker image from linux-server/code-server)
  • Remote Architecture: Linux 5.7.16-200.fc32.x86_64 terminal becomes unresponsive after socket disconnect #1 SMP Wed Aug 19 16:58:53 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • code-server --version: 3.8.0 c4610f7
@oxy oxy added the bug Something isn't working label Dec 21, 2020
@jsjoeio jsjoeio added this to the Backlog milestone Apr 29, 2021
@stale
Copy link

stale bot commented Oct 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Oct 27, 2021
@stale stale bot closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants