←back to thread

422 points km | 6 comments | | HN request time: 0.001s | source | bottom
1. ericyd ◴[] No.41832345[source]
I'm not trying to be obtuse but I am actually confused how a modern machine correctly interprets CRLF based on the description in this post.

If a modern machine interprets LF as a newline, and the cursor is moved to the left of the current row before the newline is issued, wouldn't that add a newline _before_ the current line, i.e. a newline before the left most character of the current line? Obviously this isn't how it works but I don't understand why not.

replies(2): >>41832806 #>>41832887 #
2. chowells ◴[] No.41832806[source]
Line feed is "move the cursor down one line". It's irrelevant what is currently on the line. These are printer/terminal control instructions, not text editing instructions.
replies(1): >>41840327 #
3. BlueTemplar ◴[] No.41832887[source]
If you are thinking of it being more like pressing "Home" then "Enter", it would seem that "Enter" actually works more like LFCR ?
replies(2): >>41833236 #>>41840305 #
4. layer8 ◴[] No.41833236[source]
Unless your editor is in auto-indent mode. ;)
5. ericyd ◴[] No.41840305[source]
Yes this is a good description of my confusion
6. ericyd ◴[] No.41840327[source]
Ok, I conflated terminal instruction with text editing instruction. I thought the post made them sound like they behave the same but it sounds like I misunderstood, thank you.