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

Fix crash when opening a new file #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jan9103
Copy link

@Jan9103 Jan9103 commented Feb 6, 2024

When opening a not existent file (example git checkout master; cargo run foo.txt) it will error out since the metadata check does not handle the case.

I'm not good at rust or too familiar with this project, but here's a working patch.

Bug Reproduction: rm foo.txt; kibi foo.txt
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (8966c46) 48.70% compared to head (6359161) 48.51%.

Files Patch % Lines
src/editor.rs 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #287      +/-   ##
==========================================
- Coverage   48.70%   48.51%   -0.19%     
==========================================
  Files          11       11              
  Lines        1043     1047       +4     
==========================================
  Hits          508      508              
- Misses        535      539       +4     
Flag Coverage Δ
wasm32-wasi 49.95% <0.00%> (-0.20%) ⬇️
x86_64-apple-darwin 50.04% <0.00%> (-0.20%) ⬇️
x86_64-pc-windows-gnu 0.20% <0.00%> (-0.01%) ⬇️
x86_64-unknown-linux-gnu 49.95% <0.00%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

None yet

1 participant