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

Unexpected E303 after updating Vim #14441

Open
lkintact opened this issue Apr 8, 2024 · 10 comments
Open

Unexpected E303 after updating Vim #14441

lkintact opened this issue Apr 8, 2024 · 10 comments
Labels

Comments

@lkintact
Copy link

lkintact commented Apr 8, 2024

Steps to reproduce

I tried updating Vim from version 9.0.2103 to 9.1.274, and after that it started emitting an E303 error every time I open a file.
I didn't change any settings in _vimrc.

Expected behaviour

Vim should not emit the error, should create a swap file.

Version of Vim

9.1.274

Environment

OS: Windows 10
Terminal: GUI.

Logs and stack traces

No response

@lkintact lkintact added the bug label Apr 8, 2024
@chrisbra
Copy link
Member

chrisbra commented Apr 9, 2024

we didn't make any changes to swap file handling. So that is puzzling. Can you check if it works with gvim --clean?

@lkintact
Copy link
Author

lkintact commented Apr 9, 2024

With gvim --clean gVim doesn't emit the error.

@lkintact
Copy link
Author

lkintact commented Apr 9, 2024

It probably matters: the value of the directory option in _vimrc is %HOMEDRIVE%\%HOMEPATH%\vimfiles\swap.

@lkintact
Copy link
Author

lkintact commented Apr 9, 2024

It does matter: changing directory to C:\Users\admin1\vimfiles\swap (i.e, I expanded the variables %HOMEDRIVE% and %HOMEPATH%) solved the issue.

@lkintact
Copy link
Author

lkintact commented Apr 9, 2024

Turns out for some reason Vim 9.1.274 doesn't expand the %HOMEPATH% variable: executing :set directory? yields directory=C:\%HOMEPATH%\vimfiles\swap.

@chrisbra
Copy link
Member

chrisbra commented Apr 9, 2024

Hm, it works for me with latest installer v9.1.282. Don't know what is going on. Have you checked your environment, that `%HOMEPATH% is actually defined?

@lkintact
Copy link
Author

lkintact commented Apr 9, 2024

I did, %HOMEPATH% is defined. Executing :echo $HOMEPATH yields \Users\admin1.

@lkintact
Copy link
Author

lkintact commented Apr 9, 2024

I changed directory from %HOMEDRIVE%\%HOMEPATH%\vimfiles\swap to %HOMEDRIVE%%HOMEPATH%\vimfiles\swap,
(i.e. removed the backslash) and it solved the issue.

@chrisbra
Copy link
Member

chrisbra commented Apr 9, 2024

Hm, could be caused by #14161 @zeertzjq what do you think?

@zeertzjq
Copy link
Member

zeertzjq commented Apr 9, 2024

Possibly. The patch was intended to restore the behavior before 1cd871b5341bf43ee99e136844e3131014880f92, which seemed to have unintentionally changed the behavior, but it has been over 19 years since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants