OSDN Git Service

Success build TortoiseMerge.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseMerge / LeftView.cpp
index 653c197..433d447 100644 (file)
@@ -1,6 +1,6 @@
 // TortoiseMerge - a Diff/Patch program\r
 \r
-// Copyright (C) 2006-2008 - TortoiseSVN\r
+// Copyright (C) 2006-2009 - TortoiseSVN\r
 \r
 // This program is free software; you can redistribute it and/or\r
 // modify it under the terms of the GNU General Public License\r
@@ -127,6 +127,7 @@ bool CLeftView::OnContextMenu(CPoint point, int /*nLine*/, DiffStates state)
                                                m_pwndBottom->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
                                                bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
                                                m_pwndBottom->m_pViewData->SetState(i, m_pViewData->GetState(i));\r
+                                               m_pwndBottom->m_pViewData->SetLineEnding(i, m_pViewData->GetLineEnding(i));\r
                                                if (m_pwndBottom->IsLineConflicted(i))\r
                                                {\r
                                                        if (m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
@@ -143,14 +144,15 @@ bool CLeftView::OnContextMenu(CPoint point, int /*nLine*/, DiffStates state)
                                        {\r
                                                rightstate.difflines[i] = m_pwndRight->m_pViewData->GetLine(i);\r
                                                m_pwndRight->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
-                                               DiffStates state = m_pViewData->GetState(i);\r
-                                               switch (state)\r
+                                               m_pwndRight->m_pViewData->SetLineEnding(i, m_pViewData->GetLineEnding(i));\r
+                                               DiffStates state2 = m_pViewData->GetState(i);\r
+                                               switch (state2)\r
                                                {\r
                                                case DIFFSTATE_CONFLICTEMPTY:\r
                                                case DIFFSTATE_UNKNOWN:\r
                                                case DIFFSTATE_EMPTY:\r
                                                        rightstate.linestates[i] = m_pwndRight->m_pViewData->GetState(i);\r
-                                                       m_pwndRight->m_pViewData->SetState(i, state);\r
+                                                       m_pwndRight->m_pViewData->SetState(i, state2);\r
                                                        break;\r
                                                case DIFFSTATE_YOURSADDED:\r
                                                case DIFFSTATE_IDENTICALADDED:\r
@@ -191,6 +193,7 @@ bool CLeftView::OnContextMenu(CPoint point, int /*nLine*/, DiffStates state)
                                                m_pwndBottom->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
                                                bottomstate.linestates[i] = m_pwndBottom->m_pViewData->GetState(i);\r
                                                m_pwndBottom->m_pViewData->SetState(i, m_pViewData->GetState(i));\r
+                                               m_pwndBottom->m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
                                                if (m_pwndBottom->IsLineConflicted(i))\r
                                                {\r
                                                        if (m_pViewData->GetState(i) == DIFFSTATE_CONFLICTEMPTY)\r
@@ -207,8 +210,9 @@ bool CLeftView::OnContextMenu(CPoint point, int /*nLine*/, DiffStates state)
                                        {\r
                                                rightstate.difflines[i] = m_pwndRight->m_pViewData->GetLine(i);\r
                                                m_pwndRight->m_pViewData->SetLine(i, m_pViewData->GetLine(i));\r
-                                               DiffStates state = m_pViewData->GetState(i);\r
-                                               switch (state)\r
+                                               m_pwndRight->m_pViewData->SetLineEnding(i, EOL_AUTOLINE);\r
+                                               DiffStates state2 = m_pViewData->GetState(i);\r
+                                               switch (state2)\r
                                                {\r
                                                case DIFFSTATE_ADDED:\r
                                                case DIFFSTATE_CONFLICTADDED:\r
@@ -222,7 +226,7 @@ bool CLeftView::OnContextMenu(CPoint point, int /*nLine*/, DiffStates state)
                                                case DIFFSTATE_YOURSADDED:\r
                                                case DIFFSTATE_EMPTY:\r
                                                        rightstate.linestates[i] = m_pwndRight->m_pViewData->GetState(i);\r
-                                                       m_pwndRight->m_pViewData->SetState(i, state);\r
+                                                       m_pwndRight->m_pViewData->SetState(i, state2);\r
                                                        break;\r
                                                case DIFFSTATE_IDENTICALREMOVED:\r
                                                case DIFFSTATE_REMOVED:\r