Commit 7f30e49 Jorge
committed
1 parent c9b583e commit 7f30e49 Copy full SHA for 7f30e49
File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -78,4 +78,8 @@ impl Registers {
78
78
pub fn inner ( & self ) -> & HashMap < char , Register > {
79
79
& self . inner
80
80
}
81
+
82
+ pub fn clear ( & mut self ) {
83
+ self . inner . clear ( ) ;
84
+ }
81
85
}
Original file line number Diff line number Diff line change @@ -392,6 +392,7 @@ impl MappableCommand {
392
392
wonly, "Close windows except current" ,
393
393
select_register, "Select register" ,
394
394
insert_register, "Insert register" ,
395
+ clear_registers, "Clear registers" ,
395
396
align_view_middle, "Align view middle" ,
396
397
align_view_top, "Align view top" ,
397
398
align_view_center, "Align view center" ,
@@ -4457,6 +4458,11 @@ fn insert_register(cx: &mut Context) {
4457
4458
} )
4458
4459
}
4459
4460
4461
+ fn clear_registers ( cx : & mut Context ) {
4462
+ cx. editor . registers . clear ( ) ;
4463
+ cx. editor . set_status ( "All registers cleared." )
4464
+ }
4465
+
4460
4466
fn align_view_top ( cx : & mut Context ) {
4461
4467
let ( view, doc) = current ! ( cx. editor) ;
4462
4468
align_view ( doc, view, Align :: Top ) ;
You can’t perform that action at this time.
0 commit comments