Before I impose my personal preferences, and ideas on everyone..., better see what other opinions are out there.

In 0.9.28 Lazarus has 2 main ways to position the screen when a code jump occurs:
1) "jump to implementation"
=> the "procedure FooBar" line (or the comment in front of this) is moved to the top of the editor-window 2) jump to error/bookmar/find-in-files-result,.... / execution-line for debug (breakpoint, step-over(F8))
  => the line is set to the exact center of the screen

both jumps occur, even if the line is already visible, this leads to a lot of scrolling.

For [2] this has already been reduced in 0.9.28.
- if the line is visible, and at least (aprox) 5 lines from the top/bottom of the screen, it will *not* be scrolled - it the line is visible, but within (aprox) 5 lines from the top/bottom of the screen, it will be scrolled, so it is just (about) 5 lines from the top/bottom - if the line is *not* visible, it is set to dead-center (as in the old behaviour)

[aprox 5 lines] => minimum 1 / maximum 8 / one fifth of the visble lines oneach (top/bottom) ( eg 20 visible lines => 20/5 = 4 lines on each side // 60 visible lines: 8 lines due to maximum)

The reduction of scrolling is especially useful/needed if you use multiply window/locking: http://lazarus-dev.blogspot.com/2010/04/page-locking-or-multiply-editor-windows.html
  http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options_MultiWindow

For [2] this works fine, as described above.
- it works for locked windows
- it works for unlocked windows
(if you enable it, which means a jump do declaration, could leave the current editor, in favour of an editor showing the declaration)

For [1] it doesn't yet work always.
A) if a locked window exists, showing the desired location, it will "work" => the window is *not* scrolled
   => setting the topline to "procedure FooBar" is *ignored*
B) if an unlocked window is used (assuming this is switched on) it does not (not really) work => the unlocked window is used, but despite supposedly being at the right location, it will be scrolled to the topline "procedure FooBar"

---------------------
So how should that work ([1A], [1B])? Any Ideas?

Should a locked (or unlocked) window be used, even if the line, is nearly at the bottom? You would only see the first line of the procedure, and that is hardly usable.

Should a window only be used, if the desired topline is:
- exactly correct
- within the upper half of the window (it will *not* be scrolled)
- within the upper xx% of the window (no scrolling)

----
What should happen, if the opline, is to far away from the desired line.
EG:
 Procedure FooBar;
   procedure Nested;
   begin {90 lines of code} end;
 begin
   // line to jump to

It is not possible to put the procedure header at the top of window:
- apply rules for "if already on screen"
- put "begin" at top
- center "begin"
- (if possible / configurable via option) fold procedure Nested
  [this is an option for later]



Best Regards
Martin






--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to