aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-11-19 13:40:28 +0100
committerThomas White <taw@physics.org>2017-11-19 13:40:28 +0100
commit1b1ad566f65166f9565e2042d60240e93f3e0183 (patch)
tree425f13abed617dacb7595b345e5a915ddbc3dc3a /src/sc_editor.c
parent314011f46f66bcb2dad6522d8d7352e6eb9963d4 (diff)
Dragging fixes
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index ed4db5b..620c770 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -1170,6 +1170,9 @@ static gboolean button_press_sig(GtkWidget *da, GdkEventButton *event,
e->start_corner_y = event->y - e->border_offs_y;
e->drag_status = DRAG_STATUS_COULD_DRAG;
e->drag_reason = DRAG_REASON_CREATE;
+ } else {
+ e->drag_status = DRAG_STATUS_NONE;
+ e->drag_reason = DRAG_REASON_NONE;
}
} else {
@@ -1180,6 +1183,8 @@ static gboolean button_press_sig(GtkWidget *da, GdkEventButton *event,
unset_selection(e);
find_cursor_2(clicked, x-clicked->x, y-clicked->y,
&e->sel_start);
+ find_cursor_2(clicked, x-clicked->x, y-clicked->y,
+ &e->sel_end);
e->selection = clicked;
e->cursor_frame = clicked;
if ( clicked == e->top ) {