From 16a5e0be559d84fbb99ceea9f2fb8b88dbf11628 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Fri, 9 Sep 2016 10:31:20 +0300 Subject: [PATCH] fix editor cursor positioning by mouse - for console mode --- src/dlangui/widgets/editors.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index f40c6bf9..296ef70e 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -1876,7 +1876,7 @@ class EditLine : EditWidgetBase { int x0 = i > 0 ? _measuredTextWidths[i - 1] : 0; int x1 = _measuredTextWidths[i]; int mx = (x0 + x1) >> 1; - if (pt.x < mx) { + if (pt.x <= mx) { res.pos = i; return res; }