@ -2404,7 +2404,7 @@ fn global_search(cx: &mut Context) {
let picker = Picker ::new (
let picker = Picker ::new (
columns ,
columns ,
1 , // contents
1 , // contents
vec! [ ] ,
[ ] ,
config ,
config ,
move | cx , FileResult { path , line_num , .. } , action | {
move | cx , FileResult { path , line_num , .. } , action | {
let doc = match cx . editor . open ( path , action ) {
let doc = match cx . editor . open ( path , action ) {
@ -2991,16 +2991,12 @@ fn jumplist_picker(cx: &mut Context) {
let picker = Picker ::new (
let picker = Picker ::new (
columns ,
columns ,
1 , // path
1 , // path
cx . editor
cx . editor . tree . views ( ) . flat_map ( | ( view , _ ) | {
. tree
view . jumps
. views ( )
. iter ( )
. flat_map ( | ( view , _ ) | {
. rev ( )
view . jumps
. map ( | ( doc_id , selection ) | new_meta ( view , * doc_id , selection . clone ( ) ) )
. iter ( )
} ) ,
. rev ( )
. map ( | ( doc_id , selection ) | new_meta ( view , * doc_id , selection . clone ( ) ) )
} )
. collect ( ) ,
( ) ,
( ) ,
| cx , meta , action | {
| cx , meta , action | {
cx . editor . switch ( meta . id , action ) ;
cx . editor . switch ( meta . id , action ) ;
@ -3077,7 +3073,7 @@ fn changed_file_picker(cx: &mut Context) {
let picker = Picker ::new (
let picker = Picker ::new (
columns ,
columns ,
1 , // path
1 , // path
Vec ::new ( ) ,
[ ] ,
FileChangeData {
FileChangeData {
cwd : cwd . clone ( ) ,
cwd : cwd . clone ( ) ,
style_untracked : added ,
style_untracked : added ,
@ -3124,14 +3120,15 @@ pub fn command_palette(cx: &mut Context) {
[ & cx . editor . mode ]
[ & cx . editor . mode ]
. reverse_map ( ) ;
. reverse_map ( ) ;
let mut commands : Vec < MappableCommand > = MappableCommand ::STATIC_COMMAND_LIST . into ( ) ;
let commands = MappableCommand ::STATIC_COMMAND_LIST . iter ( ) . cloned ( ) . chain (
commands . extend ( typed ::TYPABLE_COMMAND_LIST . iter ( ) . map ( | cmd | {
typed ::TYPABLE_COMMAND_LIST
MappableCommand ::Typable {
. iter ( )
name : cmd . name . to_owned ( ) ,
. map ( | cmd | MappableCommand ::Typable {
doc : cmd . doc . to_owned ( ) ,
name : cmd . name . to_owned ( ) ,
args : Vec ::new ( ) ,
args : Vec ::new ( ) ,
}
doc : cmd . doc . to_owned ( ) ,
} ) ) ;
} ) ,
) ;
let columns = vec! [
let columns = vec! [
ui ::PickerColumn ::new ( "name" , | item , _ | match item {
ui ::PickerColumn ::new ( "name" , | item , _ | match item {