From 202c46287ce6df82632860fa4ce9443ec0cf8956 Mon Sep 17 00:00:00 2001 From: copygirl Date: Thu, 5 Dec 2024 15:38:09 +0100 Subject: [PATCH] Replace "return" with "continue" in scroll_with_cursor --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 91ed1a7..6ac3473 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -493,12 +493,12 @@ fn scroll_with_cursor( match layout.glyphs.last().map(|g| g.span_index) { // no text -> do nothing - None => return, + None => continue, // if cursor is at the end, position at FlexEnd so newly typed text does not take a frame to move into view Some(1) => { style.left = Val::Auto; parent_style.justify_content = JustifyContent::FlexEnd; - return; + continue; } _ => (), }