aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2018-06-28 13:54:45 +0100
committerNerdyPepper <[email protected]>2018-06-28 13:54:45 +0100
commit07412986834f08ce3a70878a332ec2e81d836b86 (patch)
tree39588985a144a902f842126e050438bd3477c94e
parent399291eb6e90dc7d6f78ac5e92887d043916fc79 (diff)
Use formatted articles in TextViews
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 9add0c0..3f78541 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -33,6 +33,7 @@ fn search(s: &mut Cursive){
33 .on_submit(on_submit); 33 .on_submit(on_submit);
34 s.add_layer(Dialog::around(choose_result) 34 s.add_layer(Dialog::around(choose_result)
35 .title("Search Results") 35 .title("Search Results")
36 .button("Cancel", |s| match s.pop_layer() { _ => () })
36 .fixed_size(( 45,8 ))); 37 .fixed_size(( 45,8 )));
37 } 38 }
38 39
@@ -68,7 +69,7 @@ fn on_submit(s: &mut Cursive, name: &String) {
68 69
69 s.add_layer( 70 s.add_layer(
70 Dialog::around( 71 Dialog::around(
71 OnEventView::new(TextView::new(extract)) 72 OnEventView::new(TextView::new(extract_formatter(extract)))
72 .on_event('t', |s| match s.pop_layer() { _ => () }) 73 .on_event('t', |s| match s.pop_layer() { _ => () })
73 ) 74 )
74 .title(heading) 75 .title(heading)