diff --git a/platform/platform-impl/src/com/intellij/notification/EventLog.java b/platform/platform-impl/src/com/intellij/notification/EventLog.java index bfd2dfc15bd9..3a72da112979 100644 --- a/platform/platform-impl/src/com/intellij/notification/EventLog.java +++ b/platform/platform-impl/src/com/intellij/notification/EventLog.java @@ -234,8 +234,9 @@ public class EventLog implements Notifications { int linkEnd = content.indexOf(A_CLOSING, tagMatcher.end()); if (linkEnd > 0) { String linkText = content.substring(tagMatcher.end(), linkEnd).replaceAll(TAG_PATTERN.pattern(), ""); + int linkStart = document.getTextLength(); appendText(document, linkText); - links.put(document.createRangeMarker(new TextRange(document.getTextLength() - linkText.length(), document.getTextLength())), + links.put(document.createRangeMarker(new TextRange(linkStart, document.getTextLength())), new NotificationHyperlinkInfo(notification, href)); content = content.substring(linkEnd + A_CLOSING.length()); continue; diff --git a/platform/platform-tests/testSrc/com/intellij/notification/EventLogTest.groovy b/platform/platform-tests/testSrc/com/intellij/notification/EventLogTest.groovy index a974d308537b..4aea3283eb28 100644 --- a/platform/platform-tests/testSrc/com/intellij/notification/EventLogTest.groovy +++ b/platform/platform-tests/testSrc/com/intellij/notification/EventLogTest.groovy @@ -107,4 +107,14 @@ class EventLogTest extends LightPlatformTestCase { \tbar''' } + public void testTeamCityLink() { + def entry = format('title', '''
You are assigned for investigation of a test failure
FtlFixesTest.testToplevelVariableLocal (IDEA Trunk), assigned by Roman Shevchenko