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

probe#restore_vim_state clobbers per-tab working directory? #14

Open
campbellr opened this issue Jun 19, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@campbellr
Copy link
Contributor

commented Jun 19, 2019

For some background, I started using vim tabs to separate projects that i am working (eg: tab A is for project Foo, in ~/git/foo, tab B contains windows for project Bar, in ~/git/bar). I set the working directory for each project using :tcd)

This works well, but I noticed that whenever I used probe, it would for some reason clobber the tab-specific working directory with the working directory of whatever tab I called :Probe from.

I think I tracked it down to this bit of code:

function! probe#restore_vim_state()
    cal s:restore_options()
    let @" = s:unnamed_register
    let @/ = s:last_pattern
    if s:orig_working_dir != ''
        exe printf('cd %s', s:orig_working_dir)
    endif

It uses cd, and i think ideally it should use tcd, although I don't actually know enough to say whether or not that would break anyone elses workflow...

Thoughts?

@campbellr

This comment has been minimized.

Copy link
Contributor Author

commented Jun 20, 2019

Ok, I tried changing that call to use tcd instead, and it didn't fix it, so I'm not sure what's going on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.