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

C-] opens the definition on an existing buffer and not the current buffer #69

Open
dsdeiz opened this issue Jun 25, 2015 · 5 comments
Open

Comments

@dsdeiz
Copy link

dsdeiz commented Jun 25, 2015

For some weird reason C-] opens a definition on an existing buffer and not the current buffer. Is this an expected behavior?

@complex857
Copy link
Collaborator

Do you mean (this is my best guess) that if you have the file with the definition already in a buffer then it somehow makes a difference when hitting the c-] combination compared to when you don't?

I'm not sure what do you mean by existing vs current buffer. Could you please ellaborate on this?

@dsdeiz
Copy link
Author

dsdeiz commented Jun 25, 2015

Oops, sorry. This is how I can reproduce it:

  1. Open a file which is now on window A.
  2. C-W C-] on a function call (at this time it opens the file on window B and goes to the definition - somewhat messed up my terms, should've been window instead of buffer)
  3. On window B, C-] on another function call. This time it opens the function definition on window A.

I was assuming on the 3rd step, it would simply open the file with the function definition on window B but instead it opened it on window A.

@complex857
Copy link
Collaborator

Oh, i see. This jump-to-definition feature works by vim's own :tag command (prefixed with the number) so i guess that this is how it's supposed to work, but would worth checking if the behaviour changes when the plugins is disabled.

@dsdeiz
Copy link
Author

dsdeiz commented Jun 25, 2015

Yeah it's different without the plugin. On the 3rd step, it would open on window B when pressing C-] on a function call in window B. Not sure if it's relevant but :map <C-]> produces a call to phpcomplete#JumpToDefinition('normal').

@complex857
Copy link
Collaborator

Thanks for looking into this for me!
At this moment i have no clue of the reasons behind this, but I'll try to get the bottom of this.

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