aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-04-09 13:09:02 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-09 13:09:02 +0000
commit5b1f1602bccfb7c37e50a8509f44b24e9aa3b5d1 (patch)
treed7d801fa0dee8d886b1d8302ea3b0436b86bf22e /terminal.h
parentconfig: use fallback when XDG_CONFIG_{HOME,DIRS} is set, but empty (diff)
refactor: add a ‘range’ struct, grouping a start and end coord together
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/terminal.h b/terminal.h
index 76f6bf22..03297678 100644
--- a/terminal.h
+++ b/terminal.h
@@ -79,6 +79,11 @@ struct coord {
int row;
};
+struct range {
+ struct coord start;
+ struct coord end;
+};
+
struct cursor {
struct coord point;
bool lcf;
@@ -288,8 +293,7 @@ struct url {
uint64_t id;
char *url;
char32_t *key;
- struct coord start;
- struct coord end;
+ struct range range;
enum url_action action;
bool url_mode_dont_change_url_attr; /* Entering/exiting URL mode doesn’t touch the cells’ attr.url */
bool osc8;
@@ -476,15 +480,11 @@ struct terminal {
struct {
enum selection_kind kind;
enum selection_direction direction;
- struct coord start;
- struct coord end;
+ struct range coords;
bool ongoing;
bool spaces_only; /* SELECTION_SEMANTIC_WORD */
- struct {
- struct coord start;
- struct coord end;
- } pivot;
+ struct range pivot;
struct {
int fd;