@@ -2059,6 +2059,11 @@ impl GitPanel {
2059
2059
let Some ( entry) = self . entries . get ( ix) . and_then ( |e| e. status_entry ( ) ) else {
2060
2060
return ;
2061
2061
} ;
2062
+ let stage_title = if entry. status . is_staged ( ) == Some ( true ) {
2063
+ "Unstage File"
2064
+ } else {
2065
+ "Stage File"
2066
+ } ;
2062
2067
let revert_title = if entry. status . is_deleted ( ) {
2063
2068
"Restore file"
2064
2069
} else if entry. status . is_created ( ) {
@@ -2068,7 +2073,7 @@ impl GitPanel {
2068
2073
} ;
2069
2074
let context_menu = ContextMenu :: build ( window, cx, |context_menu, _, _| {
2070
2075
context_menu
2071
- . action ( "Stage File" , ToggleStaged . boxed_clone ( ) )
2076
+ . action ( stage_title , ToggleStaged . boxed_clone ( ) )
2072
2077
. action ( revert_title, git:: RestoreFile . boxed_clone ( ) )
2073
2078
. separator ( )
2074
2079
. action ( "Open Diff" , Confirm . boxed_clone ( ) )
@@ -2312,15 +2317,17 @@ impl Render for GitPanel {
2312
2317
. size_full ( )
2313
2318
. overflow_hidden ( )
2314
2319
. bg ( ElevationIndex :: Surface . bg ( cx) )
2315
- . children ( self . render_panel_header ( window, cx) )
2316
2320
. child ( if has_entries {
2317
- self . render_entries ( has_write_access, window, cx)
2321
+ v_flex ( )
2322
+ . size_full ( )
2323
+ . children ( self . render_panel_header ( window, cx) )
2324
+ . child ( self . render_entries ( has_write_access, window, cx) )
2325
+ . children ( self . render_previous_commit ( cx) )
2326
+ . child ( self . render_commit_editor ( window, cx) )
2318
2327
. into_any_element ( )
2319
2328
} else {
2320
2329
self . render_empty_state ( cx) . into_any_element ( )
2321
2330
} )
2322
- . children ( self . render_previous_commit ( cx) )
2323
- . child ( self . render_commit_editor ( window, cx) )
2324
2331
. children ( self . context_menu . as_ref ( ) . map ( |( menu, position, _) | {
2325
2332
deferred (
2326
2333
anchored ( )
0 commit comments