When running vim --clean and the defaults.vim runtime file cannot be
loaded, output an error message instead of silent to continue.
That is because if defaults.vim cannot be loaded, vim will start in
defaults mode, which may be unexpected and have quite some different defaults
and therefore behaves differently.
So make the user aware of this situation.
https://github.com/vim/vim/pull/8248
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Merging #8248 (927b2d2) into master (f5409db) will decrease coverage by
86.99%.
The diff coverage isn/a.
❗ Current head 927b2d2 differs from pull request most recent head c598d88. Consider uploading reports for the commit c598d88 to get more accurate results
@@ Coverage Diff @@ ## master #8248 +/- ## =========================================== - Coverage 89.46% 2.46% -87.00% =========================================== Files 148 146 -2 Lines 166969 161828 -5141 =========================================== - Hits 149373 3990 -145383 - Misses 17596 157838 +140242
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-none | ? |
|
| huge-gcc-none | ? |
|
| huge-gcc-testgui | ? |
|
| huge-gcc-unittests | 2.46% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/main.c | 8.96% <ø> (-81.96%) |
⬇️ |
| src/sha256.c | 0.00% <0.00%> (-97.96%) |
⬇️ |
| src/digraph.c | 0.00% <0.00%> (-97.78%) |
⬇️ |
| src/gui_gtk_f.c | 0.00% <0.00%> (-97.54%) |
⬇️ |
| src/match.c | 0.00% <0.00%> (-97.13%) |
⬇️ |
| src/crypt_zip.c | 0.00% <0.00%> (-97.06%) |
⬇️ |
| src/evalbuffer.c | 0.00% <0.00%> (-96.83%) |
⬇️ |
| src/debugger.c | 0.00% <0.00%> (-96.62%) |
⬇️ |
| src/libvterm/src/rect.h | 0.00% <0.00%> (-96.56%) |
⬇️ |
| src/textprop.c | 0.00% <0.00%> (-96.45%) |
⬇️ |
| ... and 135 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update f5409db...c598d88. Read the comment docs.
putting the do_source() call inside the "if" changes the logic, if OK is returned it continues with "else".
There is no % in the error message, use "emsg()" instead of "semsg()".
Add the error message in src/errors.h with a variable name as other errors.
Please add a test.
thanks, adjusted according to your feedback
not sure why there is an ASAN error
I thought it was just a stray ASAN error, but it fails again after including the patch.
I cannot reproduce the failure locally.
It looks like it has something to do with not exiting cleanly. But "-cq" is used elsewhere without problems.
I have not reproduce the leak with asan yet, but glancing at the code in add_termcode() in term.c, I see that the string s can leak. I'll create a PR soon with this fix:
$ git diff term.c
diff --git a/src/term.c b/src/term.c
index 0a4e5b758..a91d2c73e 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4248,6 +4248,7 @@ add_termcode(char_u *name, char_u *string, int flags)
if (new_tc == NULL)
{
tc_max_len -= 20;
+ vim_free(s);
return;
}
for (i = 0; i < tc_len; ++i)
I can reproduce it now. The shell command outputs:
E1187: Failed to source defaults.vim\e[?25l\e[J\r\nPress ENTER or type command to continue\e[?25h\e[24;1HVim: Error reading input, exiting...\n\r\nVim: Finished.
It appears the hit enter prompt is the problem.