code/diff: Fix showing inappropriate path for hunk
code/diff: Fix renderer ignores last few lines.

* Flush changed lines just before return the rendered result.
* Fix miscomputed nLastLineA and nLinstLineB.