mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Small code cleanup
This commit is contained in:
@@ -752,6 +752,7 @@ impl<'t> TextEdit<'t> {
|
||||
if multiline {
|
||||
let mut ccursor = delete_selected(text, &cursorp);
|
||||
insert_text(&mut ccursor, text, "\n");
|
||||
// TODO: if code editor, auto-indent by same leading tabs, + one if the lines end on an opening bracket
|
||||
Some(CCursorPair::one(ccursor))
|
||||
} else {
|
||||
ui.memory().surrender_focus(id); // End input with enter
|
||||
|
||||
Reference in New Issue
Block a user