OSDN Git Service

RFE: [ 874366 ] Add goto line-number - Show few lines of context above line scrolled to
authorKimmo Varis <kimmov@gmail.com>
Wed, 10 Mar 2004 15:49:46 +0000 (15:49 +0000)
committerKimmo Varis <kimmov@gmail.com>
Wed, 10 Mar 2004 15:49:46 +0000 (15:49 +0000)
Src/MergeEditView.cpp
Src/readme.txt

index 1bc225d..743b6cf 100644 (file)
@@ -1812,8 +1812,11 @@ void CMergeEditView::OnWMGoto()
                        CPoint ptPos;
                        ptPos.x = 0;
                        ptPos.y = nApparentLine;
-                       pCurrentView->ScrollToLine(ptPos.y);
-                       pOtherView->ScrollToLine(ptPos.y);
+                       int nScrollLine = nApparentLine - CONTEXT_LINES_ABOVE;
+                       if (nScrollLine < 0)
+                               nScrollLine = 0;
+                       pCurrentView->ScrollToLine(nScrollLine);
+                       pOtherView->ScrollToLine(nScrollLine);
                        pCurrentView->SetCursorPos(ptPos);
                        pOtherView->SetCursorPos(ptPos);
                        pCurrentView->SetAnchor(ptPos);
index 3614398..7e3b985 100644 (file)
@@ -4,6 +4,9 @@
   Src/Common: OptionsMgr.cpp OptionsMgr.h
  PATCH: [ 912754 ] Close open MergeDoc before opening new from DirDoc
   Src: DirDoc.cpp DirDoc.h DirView.cpp
+ RFE: [ 874366 ] Add goto line-number
+  Show few lines of context above line scrolled to
+  Src: MergeEditView.cpp
 
 2004-03-09 Kimmo
  PATCH: [ 912297 ] Splashscreen and syntax highlight options