From 23908159e4dc71dca69b05348f60f18c58e0f2ed Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 23 Sep 2015 14:28:15 +0200 Subject: gl: Fix text selection bug. --- platform/gl/gl-input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/gl/gl-input.c b/platform/gl/gl-input.c index 0788eca2..35c74866 100644 --- a/platform/gl/gl-input.c +++ b/platform/gl/gl-input.c @@ -290,7 +290,10 @@ int ui_input(int x0, int y0, int x1, int y1, struct input *input) { ui.hot = input; if (!ui.active && ui.down) + { + input->p = find_string_location(input->text, input->end, x0 + 2, ui.x); ui.active = input; + } } if (ui.active == input) -- cgit v1.2.3