1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 23:30:04 -04:00

Add character limit to TextEdit (#2816)

* Add char_limit to TextEdit

* Use match statement instead

* Update CHANGELOG.md

* Fixed panics

Updated to fix panics for UTF-8 characters and subtract overflow

* Inline code in insert_text
This commit is contained in:
cameron
2023-03-30 04:23:22 -04:00
committed by GitHub
parent fb726aaabb
commit 5fc5f087ff
2 changed files with 44 additions and 9 deletions

View File

@@ -5,7 +5,7 @@ NOTE: [`epaint`](crates/epaint/CHANGELOG.md), [`eframe`](crates/eframe/CHANGELOG
## Unreleased
* Add `char_limit` to `TextEdit` singleline mode to limit the amount of characters
## 0.21.0 - 2023-02-08 - Deadlock fix and style customizability
* ⚠️ BREAKING: `egui::Context` now use closures for locking ([#2625](https://github.com/emilk/egui/pull/2625)):