OSDN Git Service

Show Bug ID link at log dialog
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / LogDlg.cpp
index 2a209e8..35276ce 100644 (file)
@@ -515,10 +515,17 @@ void CLogDlg::FillLogMessageCtrl(bool bShow /* = true*/)
                }else\r
                {\r
                        // set the log message text\r
-                       pMsgView->SetWindowText(_T("Commit:")+pLogEntry->m_CommitHash+_T("\r\n\r\n*")+pLogEntry->m_Subject+_T("\n\n")+pLogEntry->m_Body);\r
+                       pMsgView->SetWindowText(_T("Commit:")+pLogEntry->m_CommitHash+_T("\r\n\r\n* ")+pLogEntry->m_Subject+_T("\n\n")+pLogEntry->m_Body);\r
                        // turn bug ID's into links if the bugtraq: properties have been set\r
                        // and we can find a match of those in the log message\r
-                       m_ProjectProperties.FindBugID(pLogEntry->m_Body, pMsgView);\r
+\r
+                       CString text;\r
+                       pMsgView->GetWindowText(text);\r
+                       // the rich edit control doesn't count the CR char!\r
+                       // to be exact: CRLF is treated as one char.\r
+                       text.Replace(_T("\r"), _T(""));\r
+\r
+                       m_ProjectProperties.FindBugID(text, pMsgView);\r
                        CAppUtils::FormatTextInRichEditControl(pMsgView);\r
 \r
                        int HidePaths=m_cHidePaths.GetState() & 0x0003;\r