Improve line breaking and fix search highlight colour