-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
fix: don't error on files containing special chars #75
Conversation
Summary of changesautoload/suda.vim: The Objectives from linked issues for validation#66: suda cannot handle files that include '#' in the nameTitlesuda cannot handle files that include '#' in the name Descriptionsuda seems to be unable to handle files with '#' in the name. I am able to reproduce this with a very minimal config, e.g. call plug#begin('~/.local/share/nvim/plugged') $ touch '#test' chown root:root '#test'$ nvim '#test' When I open the file: Error detected while processing BufEnter Autocommands for "*"..function suda#BufEnter: on Error detected while processing function 8_write: Interestingly, if I call the file '##test', the write succeeds, but a file named '##testtest' is written. Using nvim v0.9.4. Please let me know if I can provide any more information. WalkthroughThe updates to Changes
Assessment against linked issues
Poem
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@sserenade can you test this to ensure it works for your usecase(s)? |
Testing this by loading the branch in the config, with a similar test as before:
On open, I get the below error and the file contents aren't loaded, though vim still thinks I'm editing a file called '#test':
I'm able to write to the file and save it, with the correct name, with no errors:
However, opening the file with vim after saving it makes the above error appear again, and the file is not loaded. |
This comment was marked as resolved.
This comment was marked as resolved.
@sserenade can you try with the latest commit? |
With the latest commit, suda now behaves as expected and appears to be able to handle the file. I get no errors upon reading or writing, the file contents are what I expect, and the filename appears correct after writing. Thank you for your work on this! |
@lambdalisue any thoughts on this before merging it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fixes: #66
Summary by CodeRabbit