3#include "di/container/algorithm/minmax.h"
4#include "di/reflect/prelude.h"
5#include "di/types/integers.h"
19 constexpr friend auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<SelectionPoint>) {
19 constexpr friend auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<SelectionPoint>) {
…}
32 auto [s, e] = di::minmax({
start,
end });
38 auto b = other.normalize();
39 return a.start == b.start && a.end == other.end;
42 constexpr friend auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<Selection>) {
42 constexpr friend auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<Selection>) {
…}
Definition capability.h:8
Represents a coordinate of a visual selection.
Definition selection.h:12
u32 col
The column referenced by the selection.
Definition selection.h:14
u64 row
The absolute row referenced by the selection.
Definition selection.h:13
auto operator<=>(SelectionPoint const &) const =default
constexpr friend auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< SelectionPoint >)
Definition selection.h:19
auto operator==(SelectionPoint const &) const -> bool=default
Represents the visual selection of a terminal.
Definition selection.h:26
constexpr auto normalize() const -> Selection
Normalize the selection so that start <= end.
Definition selection.h:31
SelectionPoint end
The end of the selection (inclusive)
Definition selection.h:28
constexpr friend auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< Selection >)
Definition selection.h:42
SelectionPoint start
The start of the selection.
Definition selection.h:27
constexpr auto operator==(Selection const &other) const -> bool
Definition selection.h:36