Commit 910de8f Jorge
committed
1 parent 447909e commit 910de8f Copy full SHA for 910de8f
File tree 2 files changed +11
-0
lines changed
2 files changed +11
-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,12 @@ fn insert_register(cx: &mut Context) {
4457
4458
} )
4458
4459
}
4459
4460
4461
+ fn clear_registers ( cx : & mut Context ) {
4462
+ cx. editor . autoinfo = None ;
4463
+ cx. editor . registers . clear ( ) ;
4464
+ cx. editor . set_status ( "All registers cleared." )
4465
+ }
4466
+
4460
4467
fn align_view_top ( cx : & mut Context ) {
4461
4468
let ( view, doc) = current ! ( cx. editor) ;
4462
4469
align_view ( doc, view, Align :: Top ) ;
You can’t perform that action at this time.
0 commit comments