aboutsummaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2017-03-05 22:08:37 +0100
committerThomas White <taw@bitwiz.org.uk>2017-03-05 22:08:37 +0100
commit4b0854d62b4b4e7ce0c721a6f9f43df595aacd72 (patch)
treecb918ad22fe1299c09f2b172f8fd955a05860fdb /src/frame.c
parent4caa9d3984c8f1a50a9c787416ca5b6c73b6711a (diff)
Track whether selection is active or not
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 5a7da8e..866ae31 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -603,6 +603,16 @@ static size_t text_para_pos(Paragraph *para, double x, double y, int *ptrail)
}
+
+int positions_equal(struct edit_pos a, struct edit_pos b)
+{
+ if ( a.para != b.para ) return 0;
+ if ( a.pos != b.pos ) return 0;
+ if ( a.trail != b.trail ) return 0;
+ return 1;
+}
+
+
void sort_positions(struct edit_pos *a, struct edit_pos *b)
{
if ( a->para > b->para ) {