|
|
@ -163,6 +163,7 @@ where
|
|
|
|
helix_view::editor::StatusLineElement::Spacer => render_spacer,
|
|
|
|
helix_view::editor::StatusLineElement::Spacer => render_spacer,
|
|
|
|
helix_view::editor::StatusLineElement::VersionControl => render_version_control,
|
|
|
|
helix_view::editor::StatusLineElement::VersionControl => render_version_control,
|
|
|
|
helix_view::editor::StatusLineElement::Register => render_register,
|
|
|
|
helix_view::editor::StatusLineElement::Register => render_register,
|
|
|
|
|
|
|
|
helix_view::editor::StatusLineElement::CurrentWorkingDirectory => render_cwd,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -531,3 +532,17 @@ where
|
|
|
|
write(context, format!(" reg={} ", reg), None)
|
|
|
|
write(context, format!(" reg={} ", reg), None)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn render_cwd<F>(context: &mut RenderContext, write: F)
|
|
|
|
|
|
|
|
where
|
|
|
|
|
|
|
|
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let cwd = helix_stdx::env::current_working_dir()
|
|
|
|
|
|
|
|
.file_name()
|
|
|
|
|
|
|
|
.unwrap_or_default()
|
|
|
|
|
|
|
|
.to_str()
|
|
|
|
|
|
|
|
.unwrap_or_default()
|
|
|
|
|
|
|
|
.into();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write(context, cwd, None)
|
|
|
|
|
|
|
|
}
|
|
|
|