OSDN Git Service

RFE: [ 874366 ] Add goto line-number - Scroll line searched to center of view, as...
authorKimmo Varis <kimmov@gmail.com>
Mon, 15 Mar 2004 16:27:26 +0000 (16:27 +0000)
committerKimmo Varis <kimmov@gmail.com>
Mon, 15 Mar 2004 16:27:26 +0000 (16:27 +0000)
Src/MergeEditView.cpp
Src/readme.txt

index ad1b29c..ac5f5ad 100644 (file)
@@ -1822,7 +1822,10 @@ void CMergeEditView::OnWMGoto()
                        CPoint ptPos;
                        ptPos.x = 0;
                        ptPos.y = nApparentLine;
-                       int nScrollLine = nApparentLine - CONTEXT_LINES_ABOVE;
+
+                       // Scroll line to center of view
+                       const int offset = GetScreenLines() / 2;
+                       int nScrollLine = nApparentLine - offset;
                        if (nScrollLine < 0)
                                nScrollLine = 0;
                        pCurrentView->ScrollToLine(nScrollLine);
index f914712..c30a9a0 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-15 Kimmo
+ RFE: [ 874366 ] Add goto line-number
+   Scroll line searched to center of view, as suggested by harry mckame
+  Src: MergeEditView.cpp
+
 2004-03-14 Kimmo
  RFE [ 897975 ] Syntax highlighting for INI files
   Color "[...]"
@@ -14,7 +19,6 @@
  BUG: [ 916028 ] Deleting unique file does not remove it from view
   Src: DirActions.cpp
 
-
 2004-03-13 Seier
  Add 48*48 icon version (256 & 16 color)
  Src/res: Merge.ico