diff options
author | Dimitar Gyurov | 2023-03-10 22:42:42 +0000 |
---|---|---|
committer | GitHub | 2023-03-10 22:42:42 +0000 |
commit | 1661e4b5e1d8ebfef28f798fcb86ba2656373ba0 (patch) | |
tree | 1c3d36d81a8fe5fafd66b6b61bc5253883ed1516 /helix-view/src/editor.rs | |
parent | 98415f288ffa043520b0c85bc4464dc44b85f948 (diff) |
Add a version-control statusline element (#5682)
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 1b4664ff..41aa707f 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -467,6 +467,9 @@ pub enum StatusLineElement { /// A single space Spacer, + + /// Current version control information + VersionControl, } // Cursor shape is read and used on every rendered frame and so needs @@ -1297,6 +1300,7 @@ impl Editor { if let Some(diff_base) = self.diff_providers.get_diff_base(&path) { doc.set_diff_base(diff_base, self.redraw_handle.clone()); } + doc.set_version_control_head(self.diff_providers.get_current_head_name(&path)); let id = self.new_document(doc); let _ = self.launch_language_server(id); |