diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-06-03 21:08:45 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-07-05 07:54:28 +1000 |
| commit | 124a5d49059c1eb8ade653ef35ca9595041fc249 (patch) | |
| tree | 941010800dd29aed6a3af4a3e642ef6e56ea4b93 /src/selection.hh | |
| parent | ed123a2cc90c56b18669ea99ff5da49f3650eaae (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.hh | 4 |
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, |
