From 59fdbae1bcb37f206cb8ede839cb12cd3702a6b1 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 22 Feb 2013 15:23:36 +0000 Subject: Fix setting of empty selections. --- desktop/textarea.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/textarea.c b/desktop/textarea.c index 2da2c206b..414408045 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -183,6 +183,11 @@ static bool textarea_select(struct textarea *ta, int c_start, int c_end, bool pre_existing_selection = (ta->sel_start != -1); struct textarea_msg msg; + if (c_start == c_end) { + textarea_clear_selection(ta); + return true; + } + /* Ensure start is the beginning of the selection */ if (c_start > c_end) { swap = c_start; -- cgit v1.2.3