From 1f60d096ea3ce54c0a31107c6b8be34b3c42f11f Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Wed, 28 Sep 2016 05:27:22 +0200
Subject: Fix mouse in the search bar
---
src/sdtui.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'src')
diff --git a/src/sdtui.c b/src/sdtui.c
index f2bf15c..f14b920 100644
--- a/src/sdtui.c
+++ b/src/sdtui.c
@@ -1671,12 +1671,13 @@ app_process_left_mouse_click (Application *self, int line, int column)
; // At the moment there's nothing useful for us to do
else if (line == 1)
{
+ // FIXME: this is only an approximation
gsize label_len = g_utf8_strlen (self->search_label, -1);
gint pos = column - label_len;
if (pos >= 0)
{
self->input_pos = MIN ((guint) pos, self->input->len);
- move (0, label_len + self->input_pos);
+ move (1, label_len + self->input_pos);
refresh ();
}
}
--
cgit v1.2.3-70-g09d2