automatically unfold lines starting or ending an highlight