[smuxi: 70/111] Frontend-GNOME: fixed regex abuse in MessageTextView
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 70/111] Frontend-GNOME: fixed regex abuse in MessageTextView
- Date: Sun, 16 Feb 2014 13:19:03 +0000 (UTC)
commit c13ce441d641886ae4a782a5ce429a4e8cc5b332
Author: Mirco Bauer <meebey meebey net>
Date: Sun Jan 12 08:09:10 2014 +0100
Frontend-GNOME: fixed regex abuse in MessageTextView
src/Frontend-GNOME/Views/MessageTextView.cs | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/Frontend-GNOME/Views/MessageTextView.cs b/src/Frontend-GNOME/Views/MessageTextView.cs
index 6ccf7c0..458d893 100644
--- a/src/Frontend-GNOME/Views/MessageTextView.cs
+++ b/src/Frontend-GNOME/Views/MessageTextView.cs
@@ -844,9 +844,8 @@ namespace Smuxi.Frontend.Gnome
}
return GetPangoWidth(nickMatch.Groups[1].Value, false);
} else {
- var eventMatch = Regex.Match(msgText, "^(-!- )");
- if (eventMatch.Success && eventMatch.Groups.Count >= 2) {
- return GetPangoWidth(eventMatch.Groups[1].Value, false);
+ if (msgText.StartsWith("-!- ")) {
+ return GetPangoWidth("-!- ", false);
}
}
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]