Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

open file with line number from command-line works inconsistent #6626

Closed
rubydesign opened this issue May 3, 2015 · 4 comments
Closed

open file with line number from command-line works inconsistent #6626

rubydesign opened this issue May 3, 2015 · 4 comments

Comments

@rubydesign
Copy link

On os x 10.9 and atom 0.196

With open project-folder A and subfolder B and file c.rb
Clicking in iterm on c.rb (or running "atom B/c.rb ) will open the file in the project.
Also running atom B/c.rb:10 will open the file and go to line 10
Clicking on a stacktrace along the line of /My/home/dir/A/B/c.rb will open the file in the project, good
Just clicking /My/home/dir/A/B/c.rb:10 will open a new window with directory B and open file c.rb.
It will jump to the line, but it has opened the undesired new window.

If someone points me to the code where this happens i can probably fix it myself. Probably just a copy/paste error where a common function would create consistency.

PS: related but not the same as issue #2745
PPS: Nice tool, a general thanks.

@izuzak
Copy link
Contributor

izuzak commented May 4, 2015

@dancinglightning Strange, I'm having trouble reproducing this behavior. Can you provide more detailed steps to reproduce (even better, an example)? Also, when you say " Clicking on a stacktrace" -- where is that stacktrace exactly?

@rubydesign
Copy link
Author

Sorry if that was unclear. By clicking i mean in iterm2. But it doesn't matter if i click or do "atom..." with the file.But let me take a real example:
/Users/raisa/salama/test/virtual/virtual_helper.rb:12

So i have a terminal with pwd = /Users/raisa/salama and i go

"atom ."

The when i do

atom /Users/raisa/salama/test/virtual/virtual_helper.rb

it opens the file virtual_helper.rb as a tab in the project.

But when i go

atom /Users/raisa/salama/test/virtual/virtual_helper.rb:12

it opens a new project window for the folder "virtual" and opens the file in that window
it does jump to the line 12, but the extra open window is the bug.
imho
Thanks for looking into this. And i would like to help, seems an interesting way of doing an app.

@rubydesign
Copy link
Author

@izuzak I am sorry: In the directory path is a linked directory.
So if i open the project from the "hard" (unlinked) path, it does work as it should.

I am sorry to have taken up your time. I truly had forgotten. I'll close

@lock
Copy link

lock bot commented Jan 22, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants