Skip to content

Commit 97889a0

Browse files
committed
Fix Bitbucket issue WinMerge#140: Click doesn't trigger document to scroll in Location pane under circumstance
1 parent 1373d5f commit 97889a0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Src/LocationView.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -885,17 +885,15 @@ int CLocationView::GetLineFromYPos(int nYCoord, int bar, bool bRealLine /*= true
885885
*/
886886
int CLocationView::IsInsideBar(const CRect& rc, const POINT& pt)
887887
{
888-
int retVal = BAR_NONE;
889888
CMergeDoc *pDoc = GetDocument();
890889
for (int pane = 0; pane < pDoc->m_nBuffers; pane++)
891890
{
892891
if (m_bar[pane].PtInRect(pt))
893-
{
894-
retVal = BAR_0 + pane;
895-
break;
896-
}
892+
return BAR_0 + pane;
897893
}
898-
return retVal;
894+
if (pt.y > m_bar[0].top && pt.y <= m_bar[0].bottom)
895+
return BAR_YAREA;
896+
return BAR_NONE;
899897
}
900898

901899
/**

0 commit comments

Comments
 (0)