Skip to content
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

Does not work if multiple windows are open #27

Open
kalsan opened this issue Feb 18, 2018 · 5 comments
Open

Does not work if multiple windows are open #27

kalsan opened this issue Feb 18, 2018 · 5 comments

Comments

@kalsan
Copy link

kalsan commented Feb 18, 2018

Does not work if multiple windows are open (Arch Linux, i3 WM). To reproduce:

  • Open a folder in atom and create a .h and a .cpp file, create a folder sub and create a .cpp and .h file there as well
  • right-click sub, open in new window
  • Alt+O has no more effect (but shows up associated to switch-header-source in key binding resolver) in the new window
@dschwen
Copy link
Owner

dschwen commented May 14, 2018

Sorry for the long delay. I have confirmed the issue. I'm investigating.

@kalsan
Copy link
Author

kalsan commented May 15, 2018

With the newest update, it works on the primary window but not on the freshly opened.

@dschwen
Copy link
Owner

dschwen commented May 15, 2018

Super weird. If you close the newly opened window and do 'open in new window' on sub again, the switching works. Still investigating.

@dschwen
Copy link
Owner

dschwen commented May 15, 2018

Ok, got it. atom.project.onDidChangePaths did get triggered in the new window right after the activate method of the plugin got run (which starts the file indexing). The callback I registered just stopped the indexing. I now make it restart the indexing (so that new project paths get picked up - this should have been the behavior from the get go). It is a bit weird to receive this even and have activate called on the plugin. Effectively it starts indexing to immediately stop and restart it. This should not cause any inconvenience to the user, but it is not 100% satisfactory from a design standpoint. But I guess it is an Atom issue.

@kalsan could you please verify if v0.31.0 fixes your issue?

@kalsan
Copy link
Author

kalsan commented May 16, 2018

Thanks for the fix! Indeed the multi-window switching now works.

There's one little weird thing left, but it could be considered a bug or a feature: When pressing Ctrl+K, Left in order to open a new pane and then open a cpp or h file, the switch sometimes changes to the other pane.

Example:

  • Open .cpp file
  • Ctrl+K, right -> cpp opens once more on right hand side
  • switch-header-source -> .h opens on RHS
  • switch-header-source again -> .cpp opens... on the LHS, wtf :-D

If you consider this a feature, feel free to close the issue ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants