From af49a47cf6c5933a9bcc21f2b7bb20d85be37483 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 15 Mar 2017 22:01:32 +0100 Subject: Fix ChatInput for many lines + small UI changes --- main/src/ui/conversation_summary/message_textview.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/src/ui/conversation_summary') diff --git a/main/src/ui/conversation_summary/message_textview.vala b/main/src/ui/conversation_summary/message_textview.vala index 6474a1a3..28df9a53 100644 --- a/main/src/ui/conversation_summary/message_textview.vala +++ b/main/src/ui/conversation_summary/message_textview.vala @@ -35,7 +35,7 @@ public class MessageTextView : TextView { } private void format_suffix_urls(string text) { - int absolute_start = buffer.text.length - text.length; + int absolute_start = buffer.text.char_count() - text.char_count(); Regex url_regex = new Regex("""(?i)\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))"""); MatchInfo match_info; -- cgit v1.2.3-70-g09d2