From 372c78fac6bdf9c3bd978ce77f25518cee6a239e Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 27 May 2025 17:25:54 +0800 Subject: [PATCH] input: Fix `enter` newline position incorrect by #901 change. (#905) --- crates/ui/src/input/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui/src/input/state.rs b/crates/ui/src/input/state.rs index 85d86f88..6b3d7a5c 100644 --- a/crates/ui/src/input/state.rs +++ b/crates/ui/src/input/state.rs @@ -1203,7 +1203,7 @@ impl InputState { self.replace_text_in_range(None, "\n", window, cx); // Move cursor to the start of the next line - let mut new_offset = self.next_boundary(self.cursor_offset()) - 1; + let mut new_offset = self.cursor_offset() - 1; if is_eof { new_offset += 1; }