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

copy/remove failed when shellslash is set under Windows #776

Closed
ZSaberLv0 opened this issue Dec 1, 2017 · 4 comments
Closed

copy/remove failed when shellslash is set under Windows #776

ZSaberLv0 opened this issue Dec 1, 2017 · 4 comments

Comments

@ZSaberLv0
Copy link

To assist in resolving your issue, provide as much information as possible, in place of the ellipses () below.


Environment: Describe your Vim/NERDTree setup.

  • Operating System: Windows 7

  • Vim version :version: vim 8.0

  • NERDTree version git rev-parse --short HEAD: b89de09

  • NERDTree settings applied in your vimrc, if any:

    set shellslash
    

Process: List the steps that will recreate the issue.

navigate to nerdtree and press m to popup menu, press c or d to copy or delete node, then it would fail, while m to move the node would success

set noshellslash before popup the menu would solve the issue

however, simply unset>save>restore shellslash in lib/nerdtree/path.vim's s:Path.copy(dest) and s:Path.delete() doesn't fix this problem

@PhilRunninger
Copy link
Member

I just merged #935, and m-d is working now. m-c still fails, and I will take a look at that next.

@ZSaberLv0
Copy link
Author

@PhilRunninger #935 did solves m-c, but I think you forgot m-d, could you please fix that too?

PS: I've no idea why changing s:Path.copy(dest) / s:Path.delete() does not solve the issue

@PhilRunninger
Copy link
Member

I just pushed another commit to fix m-d. I didn't catch it before, because it seems to have been broken only if g:NERDTreeRemoveFileCmd exists; otherwise, Vim's internal delete() function is used.

The reason I didn't modify path.vim is because s:Path.copy() would receive the destination with forward slashes, and then append it to the copy command. copy c:/tmp/foo c:/tmp/bar then fails when it's sent to Windows. I chose to modify fs_menu.vim to ensure the path would be sent to s:Path.copy() in the correct format.

@ZSaberLv0
Copy link
Author

that did solve the issue, thanks

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