Open duianto opened 3 years ago
Hi!
Cool feature, let's add that!
On this page: https://stackoverflow.com/questions/9577906/fixing-emacs-hl-line-mode-for-the-last-line-of-a-buffer
This suggestion might be helpful for flashing the buffers last line when it's empty. https://stackoverflow.com/a/9787278
If you want to change hl-line-mode to also highlight the end of buffer as if it were a LF, you could that by adding a overlay with an after-string.
Here is a link to an example of how to create end-of-line indicators using overlays. Line containing point (including, but not limited to the line at the end of the buffer) is a thin underscore/underline from EOL to the right window edge. All other lines have pilcrow characters at the EOL. The EOL indicators can be changed to whatever floats one's boat; e.g., a solid rectangle. [The example is not a plug-in library ... it is just an example.]
https://github.com/lawlist/eol-indicator
The same concept can be applied to create the visual effect desired by the O.P. of this thread, however, some assembly is required.
The line doesn't flash when the cursor is on an empty line.
A possible solution is implemented in Doom Emacs, by extending the
nav-flash-face
past the EOL. https://github.com/hlissner/doom-emacs/blob/f621ff80471e8d08a72e5ece00641c70b121873a/modules/ui/nav-flash/config.el#L44It would be useful for non Doom Emacs users if this was implemented in
nav-flash
.Example
(there's an empty line above
abc
and below thed
)The following occurs when evaluating this on each line:
Current behavior, without face extend
Expected behavior, with face extend
Buffers last line issue
One issue remains on the buffers last line.
The line doesn't flash with or without extending the face.
Is there some way this could be solved?
System info
nav-flash-20191204.1427 GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26 Windows 10 Version 2004