insertNewline() without selection


#1

Using the TextEditor API, is there any way to insert a newline at a specific line number/range/point without requiring a selection? The only relevant method I am finding is insertNewline() which, according to the API docs, replaces a selection.


#2

Just add the newline to the buffer using a text splice.


#3

Not sure why I didn’t think of appending a newline character…

Thanks!