OSDN Git Service

Fix Bitbucket issue #140: Click doesn't trigger document to scroll in Location pane...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 30 Jan 2019 10:11:12 +0000 (19:11 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 30 Jan 2019 10:11:12 +0000 (19:11 +0900)
--HG--
branch : stable

Src/LocationView.cpp

index fc25df1..b266dc9 100644 (file)
@@ -885,17 +885,15 @@ int CLocationView::GetLineFromYPos(int nYCoord, int bar, bool bRealLine /*= true
  */
 int CLocationView::IsInsideBar(const CRect& rc, const POINT& pt)
 {
-       int retVal = BAR_NONE;
        CMergeDoc *pDoc = GetDocument();
        for (int pane = 0; pane < pDoc->m_nBuffers; pane++)
        {
                if (m_bar[pane].PtInRect(pt))
-               {
-                       retVal = BAR_0 + pane;
-                       break;
-               }
+                       return BAR_0 + pane;
        }
-       return retVal;
+       if (pt.y > m_bar[0].top && pt.y <= m_bar[0].bottom)
+               return BAR_YAREA;
+       return BAR_NONE;
 }
 
 /**