From 124a5d49059c1eb8ade653ef35ca9595041fc249 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 3 Jun 2018 21:08:45 +1000 Subject: Tolerate restoring invalid coordinates from register Clamp those selection after updating them to the current timestamp Fixes #2078 --- src/selection.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/selection.hh') diff --git a/src/selection.hh b/src/selection.hh index 1ab93aa5..510f999b 100644 --- a/src/selection.hh +++ b/src/selection.hh @@ -65,6 +65,10 @@ inline bool overlaps(const Selection& lhs, const Selection& rhs) void update_selections(Vector& selections, size_t& main, Buffer& buffer, size_t timestamp); +void sort_selections(Vector& selections, size_t& main); +void merge_overlapping_selections(Vector& selections, size_t& main); +void clamp_selections(Vector& sel, const Buffer& buffer); + enum class InsertMode : unsigned { Insert, -- cgit v1.2.3