Trim note display to not overlap the end of its region. Should fix #3202 and #2143.