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

Stop searching in further dirs on errors except ENOENT #12

Merged
merged 1 commit into from
Aug 11, 2019

Conversation

blueyed
Copy link

@blueyed blueyed commented Aug 11, 2019

Taking over mauke#41.

@justinmk justinmk merged commit 5b9aee2 into neovim:master Aug 11, 2019
@justinmk
Copy link
Member

@blueyed
Copy link
Author

blueyed commented Aug 11, 2019

@justinmk
I wanted to check how this behaves with regard to compatibility with ncurses, and also add tests..

@blueyed blueyed deleted the leonerd/stop-dirsearch-on-error branch August 11, 2019 14:29
@blueyed
Copy link
Author

blueyed commented Aug 11, 2019

infocmp (from ncurses) at least behaves differently:

% cp /usr/share/terminfo/s/screen t/fixtures/invalid/s/screen
% TERMINFO=$PWD/t/fixtures/invalid infocmp screen
#	Reconstructed via infocmp from file: …/Vcs/unibilium/t/fixtures/invalid/s/screen
…
% echo invalid > $PWD/t/fixtures/invalid/s/screen
% TERMINFO=$PWD/t/fixtures/invalid infocmp screen
#	Reconstructed via infocmp from file: /usr/share/terminfo/s/screen
…

@blueyed
Copy link
Author

blueyed commented Aug 11, 2019

However this patch does not change the behavior with "TERMINFO", which appears to be a bit inconsistent also then.

@pschyska
Copy link

This led to my vim silently failing on a TERMINFO_DIRS which was present, but not a directory; ~/.local/share/flatpak/exports was a file, no idea how this happened ¯\(ツ)/¯.
Neovim's &term fell back to builtin_ansi without indication, and the usual debugging steps - $TERM, infocmp, etc. did all report using terminfo/a/alacritty in that case. In neovim, I lost the ability to set title and render italics.
I'd rather keep searching here, and return the first (non-ENOENT, falling back to ENOENT) error if the search didn't ultimately succeed. This would keep the error behavior but not stop early.

@justinmk
Copy link
Member

@pschyska feel like sending a PR to explore that idea?

@pschyska
Copy link

Maybe, but no promises as I've never used C 🙂

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

Successfully merging this pull request may close these issues.

4 participants