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

VinegarUp() fails in buffer of file inside tar archive #139

Open
jmdevin opened this issue Aug 25, 2024 · 0 comments
Open

VinegarUp() fails in buffer of file inside tar archive #139

jmdevin opened this issue Aug 25, 2024 · 0 comments

Comments

@jmdevin
Copy link

jmdevin commented Aug 25, 2024

Reproduce:

  1. Open tar archive (such as this one: link) in vim.
  2. Open a file inside it by pressing <CR>
  3. Press -
  4. See the error:
tar: /home/username/Downloads/tarfile\:\:doc: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Expected behavior

Either

  1. See error message (e.g. vim-vinegar: This mapping is not supported inside tar archives.)

OR

  1. Show directory of current file as would happen with a normal file (see additional information below).

Additional information

The manner vim's tar handler uses to open a file is not what you might expect. When opening a file with <CR>, it does wincmd _ (link) to open a maximized split. Therefore, I'm not sure how the "expected behavior" would be achieved. Assuming the original window is still there, I suppose - would just be :q? And if that window doesn't exist, then the directory would open in the current window? That's assuming you can get the filepath for the original directory, which I'm not sure is available, because when in the buffer of the opened file, the output of expand('%') is /home/username/Downloads/tarfile::doc/pi_vimball.txt, showing the correct directory has been replaced by tarfile::doc.

Also, the same original error shows if you unzip the archive first.

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

1 participant