aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/global_search.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/global_search.vala')
-rw-r--r--main/src/ui/global_search.vala22
1 files changed, 11 insertions, 11 deletions
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 += "<span bgcolor=\"yellow\">".length + "</span>".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) {