Odd behavior in **Source** Window

Hi, can you post a reproducible example, called a reprex? Doesn't have to be the whole code, just enough to surface the behavior that's creating trouble.