Incorrect diff shown in Web IDE when staging different files

When changing the same file the incorrect diff can be shown.

Steps to reproduce

  1. Open the Web IDE
  2. Edit a file and stage the change
  3. Edit the same file
  4. Unstage the change

What is the current bug behavior?

The diff only highlights the second change, not the combined set of changes

What is the expected correct behavior?

The diff should highlight the total set of changes

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)