@@ -823,6 +823,17 @@ pub fn append_mode(cx: &mut Context) {
823823 graphemes::next_grapheme_boundary(text, range.to()), // to() + next char
824824 )
825825 });
826+
827+ let end = text.len_chars();
828+
829+ if selection.iter().any(|range| range.head == end) {
830+ let transaction = Transaction::change(
831+ doc.text(),
832+ vec![(end, end, Some(Tendril::from_char('\n')))].into_iter(),
833+ );
834+ doc.apply(&transaction, view.id);
835+ }
836+
826837 doc.set_selection(view.id, selection);
827838}
828839