vdiff: exit if diff is empty

currently vdiff will display an empty window if there is no diff.
	Print a message and exit early instead.
This commit is contained in:
phil9 2024-05-09 17:18:45 +00:00
parent 039015ad71
commit 025a2d172e

View file

@ -613,7 +613,7 @@ threadmain(int argc, char *argv[])
}ARGEND; }ARGEND;
parse(0); parse(0);
if(nblocks==0){ if(nblocks==1 && blocks[0]->nlines==0){
fprint(2, "no diff\n"); fprint(2, "no diff\n");
exits(nil); exits(nil);
} }