commit c87f865c7a3c15ed0c049099694ee6cc4643b684
parent 46b662933b0b980c6b2b963e5827af807bada14d
Author: Wilfred Hughes <me@wilfred.me.uk>
Date: Sun, 29 Apr 2018 11:27:18 +0100
When navigating to a reference, scroll to put it at the top
For big functions, the part of the code that actually has the
reference might be later. By putting the function at the top, we
maximise the chance that it's visible.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/helpful.el b/helpful.el
@@ -1900,6 +1900,7 @@ imenu."
(> pos (point-max)))
(widen))
(goto-char pos)
+ (recenter 0)
(save-excursion
(let ((defun-end (scan-sexps (point) 1)))
(while (re-search-forward