a little refactor: move diffviewer.view() call outside branch