I am given the severe task of re-implementing the text box GUI widget AND the type writer, so this is the origin of this question.
Currently in my project, the new line character \n
holds position coordinates of an eventual first character on the next line (column1, line+1). However, I am afraid that this isn't the standard understanding of the newline position.
Is the new line character \n
part of the same line as the previous character, is it part of the following line (as it is in my current approach) or neither of these ?
I am experiencing complications when erasing the new line with the backspace, because I have to implement a specific condition for this event, but I am trying to avoid this (or it could be avoided by changing the way I treat the new line character), because from all these conditions it looks like I am trying to invent AI or something.
In general, the newline \n
is the part of the current line, and when interpreted, emits a visual representation of the end of a line and moves the next character (onwards) to be printed on the next line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With