Fix TexEdit clipping half the cursor when in the first column

Closes https://github.com/emilk/egui/issues/1449
This commit is contained in:
Emil Ernerfeldt 2022-04-04 09:20:19 +02:00
parent dfd6a91cb0
commit 5d19f381f9

View file

@ -419,7 +419,7 @@ impl<'t> TextEdit<'t> {
};
let mut response = ui.interact(rect, id, sense);
let text_clip_rect = rect;
let painter = ui.painter_at(text_clip_rect);
let painter = ui.painter_at(text_clip_rect.expand(1.0)); // expand to avoid clipping cursor
if interactive {
if let Some(pointer_pos) = ui.ctx().pointer_interact_pos() {