feature: make behavior when header.border = true
consistent whether or not there is a blank newline above/below the header
#183
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Currently, when
header.border = true
and there is a blank newline above the header, the border is applied to the blank newline, but when there is a non-blank line above the header, a "phantom" line is rendered and the border is applied to that "phantom" newline, and this behavior is the same for the border below the header.This makes moving up or down by line when there is a header unpredictable. To make the situation a bit clearer:
The following would look the same:
However, moving the cursor down a line in the first example would move the cursor to the empty line (and hide the border of the header), while moving the cursor down in the second example would move the cursor to the line with the header.
Describe the solution you'd like
When
header.border = true
, render the border on a "phantom" line, regardless of whether or not there is an empty line above or below it.This would have the added benefit of fixing the rendering headers at the top and bottom of the file (currently, when there is a header at the top of the file, the top border is not rendered, and the same is true of the bottom border for a header on the last line of the file).
Describe alternatives you've considered
Add a configuration value to control this behavior, eg:
header.border_position
, with (perhaps) a value ofoverlay
preserving the current behavior, and a value ofvirtual
(or some better-named value) triggering the consistent behavior I've described above.Additional information
Again, I really appreciate this plugin and all of the work you've put into it! It's meaningfully improved my Neovim experience.
The text was updated successfully, but these errors were encountered: