OSDN Git Service

キーダウンスクロール処理修正
authorunknown <qwerty2501@users.sourceforge.jp>
Tue, 31 Jan 2012 00:36:59 +0000 (09:36 +0900)
committerunknown <qwerty2501@users.sourceforge.jp>
Tue, 31 Jan 2012 00:36:59 +0000 (09:36 +0900)
nlite.suo
nlite/nlite_commentview.cpp

index dfbe999..c440254 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index 14bfb8b..b42920a 100644 (file)
@@ -856,7 +856,7 @@ overclientrect:
                vScrollInfo.fMask = SIF_ALL;
                self.GetScrollInfo(SB_VERT,&vScrollInfo);
 
-               if(!(cursel >= vScrollInfo.nPos && cursel < vScrollInfo.nPos + static_cast<INT_PTR>(vScrollInfo.nPage))){
+               if(!(cursel >= vScrollInfo.nPos && cursel <= vScrollInfo.nPos + static_cast<INT_PTR>(vScrollInfo.nPage) / 2)){
                        self.SetScrollPos(SB_VERT,cursel - (vScrollInfo.nPage / 2));
                }
 
@@ -1017,7 +1017,7 @@ end:
 
                dy += self.commentlist.GetCurSel();
                
-               if(dy < 0 || dy > static_cast<INT_PTR>(self.commentlist.Size()))goto end;
+               if(dy < 0 || dy >= static_cast<INT_PTR>(self.commentlist.Size()))goto end;
 
                self.commentlist.SetCurSel(dy);