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

A trailing slash is disappeared from <afile> #20847

Closed
emonkak opened this issue Oct 28, 2022 · 1 comment · Fixed by #20853
Closed

A trailing slash is disappeared from <afile> #20847

emonkak opened this issue Oct 28, 2022 · 1 comment · Fixed by #20853
Assignees
Labels
bug-regression wrong behavior that was introduced in a previous commit (please bisect) events events, autocommands io

Comments

@emonkak
Copy link
Contributor

emonkak commented Oct 28, 2022

Neovim version (nvim -v)

v0.8.0

Vim (not Nvim) behaves the same?

no, vim 9.0.0655

Operating system/version

Gentoo Linux

Terminal name/version

Alacritty

$TERM environment variable

xterm-256color

Installation

emerge vim

How to reproduce the issue

NVim:

$ nvim -u NONE -es --cmd 'au VimEnter * verbose echo expand("%") expand("<afile>") "\n" | q' foo/
foo/ foo

Vim:

$ vim -u NONE -es --cmd 'au VimEnter * verbose echo expand("%") expand("<afile>") "\n" | q' foo/
foo/ foo/

Expected behavior

Both expand('%') and expand('<afile>') should return 'foo/'. Vim (not Nvim) works as expected.

Actual behavior

expand('<afile>') returns 'foo' without a trailing slash.

Related: #2833

@emonkak emonkak added the bug issues reporting wrong behavior label Oct 28, 2022
@zeertzjq zeertzjq added the events events, autocommands label Oct 28, 2022
@zeertzjq
Copy link
Member

Seems a regression between v0.5.0 and v0.6.0.

@zeertzjq zeertzjq added bug-regression wrong behavior that was introduced in a previous commit (please bisect) io and removed bug issues reporting wrong behavior labels Oct 28, 2022
@zeertzjq zeertzjq self-assigned this Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-regression wrong behavior that was introduced in a previous commit (please bisect) events events, autocommands io
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants