From 81e82845728cd96a5cd2f7ffb1ba83cbe278ad27 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:09:28 +0900 Subject: [PATCH] Update builder.rs --- crates/egui/src/widgets/text_edit/builder.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/egui/src/widgets/text_edit/builder.rs b/crates/egui/src/widgets/text_edit/builder.rs index 012d8c8f0d5..39bd79b74d9 100644 --- a/crates/egui/src/widgets/text_edit/builder.rs +++ b/crates/egui/src/widgets/text_edit/builder.rs @@ -1,6 +1,5 @@ use std::sync::Arc; -use emath::Rect; use epaint::text::{cursor::CCursor, Galley, LayoutJob}; use crate::{ @@ -723,16 +722,6 @@ impl<'t> TextEdit<'t> { } } - // Allocate additional space if edits were made this frame that changed the size. This is important so that, - // if there's a ScrollArea, it can properly scroll to the cursor. - let extra_size = galley.size() - rect.size(); - if extra_size.x > 0.0 || extra_size.y > 0.0 { - ui.allocate_rect( - Rect::from_min_size(outer_rect.max, extra_size), - Sense::hover(), - ); - } - painter.galley(galley_pos, galley.clone(), text_color); if has_focus {