From c0f8e18437b7d4c0878be4ef8981196d06fa17af Mon Sep 17 00:00:00 2001 From: piotrkwarcinski Date: Tue, 10 Jun 2025 01:22:06 +0200 Subject: [PATCH] Clear history after a change --- helix-view/src/document.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index b3317c628..049fdaf48 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1468,6 +1468,9 @@ impl Document { .ensure_invariants(self.text.slice(..)); } + // Reset the selection history after any change + self.selections_history.clear(); + for view_data in self.view_data.values_mut() { view_data.view_position.anchor = transaction .changes()