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/sc_editor.c | |
parent | 4caa9d3984c8f1a50a9c787416ca5b6c73b6711a (diff) |
Track whether selection is active or not
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r-- | src/sc_editor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c index ddaaedc..a3754a6 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -1022,6 +1022,7 @@ static void unset_selection(SCEditor *e) a = e->sel_end.para; b = e->sel_start.para; } + e->sel_active = 0; rewrap_paragraph_range(e->top, a, b, e->sel_start, e->sel_end, 0); } @@ -1185,6 +1186,7 @@ static gboolean motion_sig(GtkWidget *da, GdkEventMotion *event, e->sel_start, e->sel_end, 1); find_cursor(fr, x-fr->x, y-fr->y, &e->cursor_para, &e->cursor_pos, &e->cursor_trail); + e->sel_active = !positions_equal(e->sel_start, e->sel_end); sc_editor_redraw(e); break; |