From bd7fde99af3df59c5ec96184b2649b4308250b24 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 10 Sep 2019 19:11:41 +0200 Subject: fixup Fix some warnings --- main/src/ui/global_search.vala | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'main/src/ui/global_search.vala') diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala index db7dbc0f..74e96999 100644 --- a/main/src/ui/global_search.vala +++ b/main/src/ui/global_search.vala @@ -205,8 +205,8 @@ public class GlobalSearch : Overlay { regex_str += ")"; // Color the keywords - int elongated_by = 0; try { + int elongated_by = 0; Regex highlight_regex = new Regex(regex_str); MatchInfo match_info; string markup_text_bak = markup_text.down(); @@ -218,19 +218,19 @@ public class GlobalSearch : Overlay { elongated_by += "".length + "".length; } markup_text_bak += ""; // We need markup_text_bak to live until here because url_regex.match does not copy the string - - label.label = markup_text; - grid.attach(label, 1, 1, 1, 1); - - Button button = new Button() { relief=ReliefStyle.NONE, visible=true }; - button.clicked.connect(() => { - selected_item(item); - }); - button.add(grid); - return button; } catch (RegexError e) { assert_not_reached(); } + + label.label = markup_text; + grid.attach(label, 1, 1, 1, 1); + + Button button = new Button() { relief=ReliefStyle.NONE, visible=true }; + button.clicked.connect(() => { + selected_item(item); + }); + button.add(grid); + return button; } private Grid get_context_message_widget(MessageItem item) { -- cgit v1.2.3-54-g00ecf