Implement word wrap

This commit is contained in:
Jeremy Soller 2023-11-01 09:25:46 -06:00
parent 8fb9d823d7
commit 5ce34b93c4
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
3 changed files with 38 additions and 8 deletions

View file

@ -86,7 +86,7 @@ pub enum Message {
TabActivate(segmented_button::Entity),
TabClose(segmented_button::Entity),
Todo,
Wrap(bool),
ToggleWrap,
}
impl App {
@ -539,8 +539,8 @@ impl cosmic::Application for App {
Message::Todo => {
log::warn!("TODO");
}
Message::Wrap(wrap) => {
self.config.wrap = wrap;
Message::ToggleWrap => {
self.config.wrap = !self.config.wrap;
//TODO: provide iterator over data
let entities: Vec<_> = self.tab_model.iter().collect();
for entity in entities {