aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 8607c65a..d828f9ec 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -571,6 +571,11 @@ impl Editor {
self.status_msg = Some((error.into(), Severity::Error));
}
+ #[inline]
+ pub fn get_status(&self) -> Option<(&Cow<'static, str>, &Severity)> {
+ self.status_msg.as_ref().map(|(status, sev)| (status, sev))
+ }
+
pub fn set_theme(&mut self, theme: Theme) {
// `ui.selection` is the only scope required to be able to render a theme.
if theme.find_scope_index("ui.selection").is_none() {