1
0
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:
Emil Ernerfeldt
2021-10-23 05:58:57 +02:00
parent a3ba85dbb3
commit 39c6c7e5c9
6 changed files with 10 additions and 10 deletions

View File

@@ -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