If total no of lines in buffer is less than available window height, ensure top line is visible at the top of window
Else if the distance from desired line to set, and last line in buffer, is less than half of window height, ensure last line is at the very bottom of window
This was implemented by simply running normal! zz on every goto_location (configurable via outline_window.center_on_jump). Does not seem to be needed for the outline as of now.
This applies to:
General algorithm:
zz