gitk: Some improvements for the code for updating the display