diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index ab924a74a6a2f..d905595a92545 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -241,7 +241,16 @@ fn update_vim_mode_indicator_position( status_bar.remove_item_at(mode_indicator_position, cx); match new_location { Some(ModeIndicatorLocation::Left) => { - status_bar.add_left_item(vim_mode_indicator, cx) + if let (Some(diagnostics_indicator), Some(diagnostics_indicator_position)) = + (status_bar.item_of_type::(), + status_bar.position_of_item::()) + { + status_bar.remove_item_at(diagnostics_indicator_position, cx); + status_bar.add_left_item(vim_mode_indicator, cx); + status_bar.add_left_item(diagnostics_indicator, cx); + } else { + status_bar.add_left_item(vim_mode_indicator, cx) + } } Some(ModeIndicatorLocation::Right) | None => { status_bar.add_right_item(vim_mode_indicator, cx)