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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.