@@ -2214,6 +2214,7 @@ impl Pane {
2214
2214
. and_then ( |item| item. project_path ( cx) )
2215
2215
. map ( |project_path| project_path. path )
2216
2216
. map_or ( None , |path| if path. exists ( ) { Some ( path) } else { None } ) ;
2217
+ let has_relative_path = relative_path. is_some ( ) ;
2217
2218
2218
2219
let entry_id = entry. to_proto ( ) ;
2219
2220
menu = menu
@@ -2242,19 +2243,21 @@ impl Pane {
2242
2243
} )
2243
2244
. map ( pin_tab_entries)
2244
2245
. separator ( )
2245
- . entry (
2246
- "Reveal In Project Panel" ,
2247
- Some ( Box :: new ( RevealInProjectPanel {
2248
- entry_id : Some ( entry_id) ,
2249
- } ) ) ,
2250
- cx. handler_for ( & pane, move |pane, cx| {
2251
- pane. project . update ( cx, |_, cx| {
2252
- cx. emit ( project:: Event :: RevealInProjectPanel (
2253
- ProjectEntryId :: from_proto ( entry_id) ,
2254
- ) )
2255
- } ) ;
2256
- } ) ,
2257
- )
2246
+ . when ( has_relative_path, |menu| {
2247
+ menu. entry (
2248
+ "Reveal In Project Panel" ,
2249
+ Some ( Box :: new ( RevealInProjectPanel {
2250
+ entry_id : Some ( entry_id) ,
2251
+ } ) ) ,
2252
+ cx. handler_for ( & pane, move |pane, cx| {
2253
+ pane. project . update ( cx, |_, cx| {
2254
+ cx. emit ( project:: Event :: RevealInProjectPanel (
2255
+ ProjectEntryId :: from_proto ( entry_id) ,
2256
+ ) )
2257
+ } ) ;
2258
+ } ) ,
2259
+ )
2260
+ } )
2258
2261
. when_some ( parent_abs_path, |menu, parent_abs_path| {
2259
2262
menu. entry (
2260
2263
"Open in Terminal" ,
0 commit comments