File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,9 @@ impl Edit {
82
82
self . editable_line . set_content ( content) ;
83
83
}
84
84
85
- pub ( crate ) fn clear ( & mut self ) {
85
+ pub ( crate ) fn reset ( & mut self ) {
86
86
self . editable_line . clear ( ) ;
87
+ self . editable_line . set_read_only ( false ) ;
87
88
self . finished = false ;
88
89
}
89
90
Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ fn set_get_content() {
61
61
}
62
62
63
63
#[ test]
64
- fn clear_content ( ) {
64
+ fn reset ( ) {
65
65
let mut module = Edit :: new ( ) ;
66
66
module. set_content ( "abcd" ) ;
67
- module. clear ( ) ;
67
+ module. reset ( ) ;
68
68
assert_eq ! ( module. get_content( ) , "" ) ;
69
+ assert ! ( !module. is_finished( ) ) ;
69
70
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ pub(crate) struct Insert {
34
34
impl Module for Insert {
35
35
fn activate ( & mut self , _: State ) -> Results {
36
36
self . state = InsertState :: Prompt ;
37
- self . edit . clear ( ) ;
37
+ self . edit . reset ( ) ;
38
38
Results :: new ( )
39
39
}
40
40
You can’t perform that action at this time.
0 commit comments