From 54ea8f74ae4ae3bff6df3f09ce8a8cdd148e51e5 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 1 Mar 2016 12:04:43 +0000 Subject: When a mouse drag is finished, fire a MouseUp key press, instead of doing the drag end in code. From Stephen Coakley. --- window-copy.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'window-copy.c') diff --git a/window-copy.c b/window-copy.c index 009ed246..d345f246 100644 --- a/window-copy.c +++ b/window-copy.c @@ -2248,7 +2248,7 @@ window_copy_start_drag(struct client *c, struct mouse_event *m) return; c->tty.mouse_drag_update = window_copy_drag_update; - c->tty.mouse_drag_release = window_copy_drag_release; + c->tty.mouse_drag_release = NULL; /* will fire MouseUp key */ window_copy_update_cursor(wp, x, y); window_copy_start_selection(wp); @@ -2275,16 +2275,3 @@ window_copy_drag_update(__unused struct client *c, struct mouse_event *m) if (window_copy_update_selection(wp, 1)) window_copy_redraw_selection(wp, old_cy); } - -void -window_copy_drag_release(__unused struct client *c, struct mouse_event *m) -{ - struct window_pane *wp; - - wp = cmd_mouse_pane(m, NULL, NULL); - if (wp == NULL || wp->mode != &window_copy_mode) - return; - - window_copy_copy_selection(wp, NULL); - window_pane_reset_mode(wp); -} -- cgit