From de32e18b8db43e7b2106d8fcb112138718803d81 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 31 Aug 2023 21:30:46 -0400 Subject: [PATCH] also allow disabling the diff provider entirely --- helix-view/src/document.rs | 3 +++ helix-view/src/editor.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 516db6725e46e..83931019d607d 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1624,6 +1624,9 @@ impl Document { } } } + DiffSource::None => { + self.diff_handle = None; + } } self.version_control_head = match diff_provider.get_current_head_name(path) { diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index d6173e6117e36..1274faf4d65a9 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -79,6 +79,7 @@ pub enum DiffSource { #[default] Git, File, + None, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]