-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shows header even if top of window is not in a defun #1
Comments
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. |
It would only be a jump of one line though, right? I think I'd prefer that to having a misleading header. |
I'd find the jumping really annoying, I think. As it is, it seems to show the top line of the file (i.e. |
Good idea! or even just a blank header if there is no such comment. |
* Add two new customizable faces, topsy and topsy-highlight. The topsy face is used for the header-line face when topsy-mode is enabled. It inherits from the default face, so that the text in the header line matches the contents of the buffer. The topsy-highlight face is applied (with low priority) when topsy is showing the first line of a defun (see below). To go back to the previous appearance (using header-line face), customize the topsy face to nil or remove its ":inherit default" attribute. * Properly handle narrowed buffers The first line of the defun is shown even if it is only partly within a narrowed buffer. * Improve logic for finding the first line of a defun The first line of a defun is shown only if it is partially visible. If the defun is entirely outside the window, its first line is not shown. Fixes alphapapa#1 * Show previous line when a defun starts at the top of a window Finally, when there is no partially visible defun, show the line that is above the top of the window. This gives a smooth scrolling effect, where the header line looks and acts just like a normally scrolling part of the buffer. When you scroll up, the top line of text will appear in the header line, which then becomes sticky when you scroll past a defun. Buffer text shown in this way doesn't have the topsy-highlight face.
* Add two new customizable faces, topsy and topsy-highlight. The topsy face is used for the header-line face when topsy-mode is enabled. It inherits from the default face, so that the text in the header line matches the contents of the buffer. The topsy-highlight face is applied (with low priority) when topsy is showing the first line of a defun (see below). To go back to the previous appearance (using header-line face), customize the topsy face to nil or remove its ":inherit default" attribute. * Properly handle narrowed buffers The first line of the defun is shown even if it is only partly within a narrowed buffer. * Improve logic for finding the first line of a defun The first line of a defun is shown only if it is partially visible. If the defun is entirely outside the window, its first line is not shown. Fixes alphapapa#1 * Show previous line when a defun starts at the top of a window Finally, when there is no partially visible defun, show the line that is above the top of the window. This gives a smooth scrolling effect, where the header line looks and acts just like a normally scrolling part of the buffer. When you scroll up, the top line of text will appear in the header line, which then becomes sticky when you scroll past a defun. Buffer text shown in this way doesn't have the topsy-highlight face.
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).The text was updated successfully, but these errors were encountered: