5

When I enable line numbers in Emacs the cursor starts in a line with no number in it. If you press enter then the numbers increment but always there is a line with no number. Why is that happening?

enter image description here

enter image description here

1 Answer 1

5

Because the last line hasn't started yet. Adding newline symbol to the end makes the cursor jump from the current line to the next one, but it doesn't add anything to it (new one). Strictly speaking, it is not a line yet.

Supposing that every newline symbol was visible, you would get

1. <newline_symbol>
2. <newline_symbol>
3. <newline_symbol>
   <cursor_there_and_nothing_else>

Once you start typing in this line, it receives some content, so the number will appear.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.