From 7a4cf29d4d7e7c836ff0a21ae91124df5b3dd89b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 8 Nov 2023 11:56:16 -0700 Subject: [PATCH] Editor: shaped and layout lines inserted by Action::Enter --- src/edit/editor.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/edit/editor.rs b/src/edit/editor.rs index 3876855..187f84b 100644 --- a/src/edit/editor.rs +++ b/src/edit/editor.rs @@ -524,6 +524,9 @@ impl Edit for Editor { self.cursor.index = 0; self.buffer.lines.insert(self.cursor.line, new_line); + + // Ensure line is properly shaped and laid out (for potential immediate commands) + self.buffer.line_layout(font_system, self.cursor.line); } Action::Backspace => { if self.delete_selection() {