mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2880: unified diff fails if actually used
Problem: Unified diff fails if actually used. Solution: Invoke :diffupdate in the test. Fix the check for working external diff. (Ghjuvan Lacambre, Christian Brabandt, closes #8197)
This commit is contained in:
committed by
Bram Moolenaar
parent
f5409dbf66
commit
ad5c178a19
@@ -1007,10 +1007,12 @@ check_external_diff(diffio_T *diffio)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
// There must be a line that contains "1c1".
|
||||
// For normal diff there must be a line that contains
|
||||
// "1c1". For unified diff "@@ -1 +1 @@".
|
||||
if (vim_fgets(linebuf, LBUFLEN, fd))
|
||||
break;
|
||||
if (STRNCMP(linebuf, "1c1", 3) == 0)
|
||||
if (STRNCMP(linebuf, "1c1", 3) == 0
|
||||
|| STRNCMP(linebuf, "@@ -1 +1 @@", 11) == 0)
|
||||
ok = TRUE;
|
||||
}
|
||||
fclose(fd);
|
||||
|
Reference in New Issue
Block a user