File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 44
44
| ` :show-directory ` , ` :pwd ` | Show the current working directory. |
45
45
| ` :encoding ` | Set encoding. Based on ` https://encoding.spec.whatwg.org ` . |
46
46
| ` :reload ` | Discard changes and reload from the source file. |
47
- | ` :reload-all ` , ` :ra ` | Discard changes and reload all documents from the source file . |
47
+ | ` :reload-all ` | Discard changes and reload all documents from the source files . |
48
48
| ` :update ` | Write changes only if the file has been modified. |
49
49
| ` :lsp-workspace-command ` | Open workspace command picker |
50
50
| ` :lsp-restart ` | Restarts the Language Server that is in use by the current doc |
Original file line number Diff line number Diff line change @@ -1046,22 +1046,22 @@ fn reload_all(
1046
1046
let scrolloff = cx. editor . config ( ) . scrolloff ;
1047
1047
let view_id = view ! ( cx. editor) . id ;
1048
1048
1049
- let docs_views : Vec < ( DocumentId , Vec < ViewId > ) > = cx
1049
+ let docs_view_ids : Vec < ( DocumentId , Vec < ViewId > ) > = cx
1050
1050
. editor
1051
1051
. documents_mut ( )
1052
1052
. map ( |doc| {
1053
- let mut views : Vec < _ > = doc. selections ( ) . keys ( ) . cloned ( ) . collect ( ) ;
1053
+ let mut view_ids : Vec < _ > = doc. selections ( ) . keys ( ) . cloned ( ) . collect ( ) ;
1054
1054
1055
- if views . is_empty ( ) {
1055
+ if view_ids . is_empty ( ) {
1056
1056
doc. ensure_view_init ( view_id) ;
1057
- views = vec ! [ view_id] ;
1057
+ view_ids . push ( view_id) ;
1058
1058
} ;
1059
1059
1060
- ( doc. id ( ) , views )
1060
+ ( doc. id ( ) , view_ids )
1061
1061
} )
1062
1062
. collect ( ) ;
1063
1063
1064
- for ( doc_id, view_ids) in docs_views {
1064
+ for ( doc_id, view_ids) in docs_view_ids {
1065
1065
let doc = doc_mut ! ( cx. editor, & doc_id) ;
1066
1066
1067
1067
// Every doc is guaranteed to have at least 1 view at this point.
@@ -2098,7 +2098,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
2098
2098
TypableCommand {
2099
2099
name : "reload-all" ,
2100
2100
aliases : & [ ] ,
2101
- doc : "Discard changes and reload all documents from the source file ." ,
2101
+ doc : "Discard changes and reload all documents from the source files ." ,
2102
2102
fun : reload_all,
2103
2103
completer : None ,
2104
2104
} ,
You can’t perform that action at this time.
0 commit comments