void CMergeEditView::ShowDiff(BOOL bScroll, BOOL bSelectText)
{
CMergeDoc *pd = GetDocument();
+ CMergeEditView *pCurrentView = NULL;
+ CMergeEditView *pOtherView = NULL;
int nDiff = pd->GetCurrentDiff();
+
+ if (m_bIsLeft)
+ {
+ pCurrentView = pd->GetLeftView();
+ pOtherView = pd->GetRightView();
+ }
+ else
+ {
+ pCurrentView = pd->GetRightView();
+ pOtherView = pd->GetLeftView();
+ }
+
if (nDiff >= 0 && nDiff < (int)pd->m_nDiffs)
{
CPoint ptStart, ptEnd;
int line = ptStart.y - CONTEXT_LINES_ABOVE;
if (line < 0)
line = 0;
- ScrollToLine(line);
+
+ pCurrentView->ScrollToLine(line);
+ pOtherView->ScrollToLine(line);
}
- SetCursorPos(ptStart);
- SetAnchor(ptStart);
+ pCurrentView->SetCursorPos(ptStart);
+ pOtherView->SetCursorPos(ptStart);
+ pCurrentView->SetAnchor(ptStart);
+ pOtherView->SetAnchor(ptStart);
}
if (bSelectText)
+2004-01-12 Kimmo
+ PATCH: [ 874451 ] Update lineposition offpane when navigating diffs
+ Fixes wrong linenumber and cursor position in inactive file
+ WinMerge: MergeEditView.cpp
+
2004-01-11 Perry
PATCH: [ 875237 ] Fix fwrite call in UniStdioFile::WriteString
Fix byte count and argument order when UniStdioFile::WriteString calls fwrite.