alphapapa / topsy.el

Simple sticky header showing definition beyond top of window
GNU General Public License v3.0
100 stars 6 forks source link

Shows header even if top of window is not in a defun #1

Open aspiers opened 3 years ago

aspiers commented 3 years ago

This can be somewhat confusing, as the end of the defun the header refers to is not visible. I think it should look to see if it's in a defun, and if not, omit the header (or at least offer a defcustom for this behaviour).

alphapapa commented 3 years ago

I think it might be better to not disable the header, because I guess that would cause buffer text to jump around when the header line is toggled.

What do you think? Thanks.

aspiers commented 3 years ago

It would only be a jump of one line though, right? I think I'd prefer that to having a misleading header.

alphapapa commented 3 years ago

I'd find the jumping really annoying, I think. As it is, it seems to show the top line of the file (i.e. ;;; simple-sticky-header.el ...), which I don't mind. It would probably also be relatively easy to have it show the ;;;-style section heading above the window start.

aspiers commented 3 years ago

Good idea! or even just a blank header if there is no such comment.