summaryrefslogtreecommitdiff
path: root/src/selection.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-06-03 21:08:45 +1000
committerMaxime Coste <mawww@kakoune.org>2018-07-05 07:54:28 +1000
commit124a5d49059c1eb8ade653ef35ca9595041fc249 (patch)
tree941010800dd29aed6a3af4a3e642ef6e56ea4b93 /src/selection.hh
parented123a2cc90c56b18669ea99ff5da49f3650eaae (diff)
Tolerate restoring invalid coordinates from register
Clamp those selection after updating them to the current timestamp Fixes #2078
Diffstat (limited to 'src/selection.hh')
-rw-r--r--src/selection.hh4
1 files changed, 4 insertions, 0 deletions
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<Selection>& selections, size_t& main,
Buffer& buffer, size_t timestamp);
+void sort_selections(Vector<Selection>& selections, size_t& main);
+void merge_overlapping_selections(Vector<Selection>& selections, size_t& main);
+void clamp_selections(Vector<Selection>& sel, const Buffer& buffer);
+
enum class InsertMode : unsigned
{
Insert,