Switch line numbering based on whether a buffer is active