move merge hilight logic from ui.js to agda.js