Blob Blame History Raw
From f0f3792f766e187b770c714322e972db75336317 Mon Sep 17 00:00:00 2001
From: Alexandros Frantzis <alf82@freemail.gr>
Date: Thu, 15 Apr 2021 18:41:21 +0300
Subject: [PATCH] gui: Clear selection on revert

The selection may become invalid when reloading the file from disk,
since the file size may have changed.

Fixes #43
---
 src/gui/DataView.cs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gui/DataView.cs b/src/gui/DataView.cs
index 4455ed1..990ce22 100644
--- a/src/gui/DataView.cs
+++ b/src/gui/DataView.cs
@@ -515,6 +515,7 @@ public void Revert()
 		cursorRedoDeque.Clear();
 		cursorUndoDeque.Clear();
 
+		SetSelection(-1, -1);
 		MoveCursor(0, 0);
 	}