diff options
author | Thomas White <taw@bitwiz.org.uk> | 2017-03-05 22:08:37 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2017-03-05 22:08:37 +0100 |
commit | 4b0854d62b4b4e7ce0c721a6f9f43df595aacd72 (patch) | |
tree | cb918ad22fe1299c09f2b172f8fd955a05860fdb /src/frame.c | |
parent | 4caa9d3984c8f1a50a9c787416ca5b6c73b6711a (diff) |
Track whether selection is active or not
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 10 |
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 ) { |