Fix async flow when diffing a file (Fix #291)