Skip to content
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

Disable leading newline #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

c4eater
Copy link
Contributor

@c4eater c4eater commented May 2, 2022

This change adds a new TermOption, "has_leading_newline".

When this option is set to false (default is true), TermLock::ensure_height() would not add a leading newline (=the separator between the original line contents and the new contents) to the output anymore.

When it is set to true, there is no change in ensure_height()'s behavior (the leading newline is present).

I'm using this option and setting it to false in my version of skim (https://github.com/c4eater/skim/tree/disable-leading-newline) because the output looks better without the leading newline.

Here are some screenshots of skim with and without the leading newline:
If has_leading_newline is false:

If has_leading_newline is true (default):

This change adds a new TermOption, "has_leading_newline".

When this option is set to false (default is true),
TermLock::ensure_height() does not add a leading newline
(=the separator between the original line contents and the new
contents) to the output anymore.

When it is set to true, there is no change in ensure_height()'s
behavior (the leading newline is present).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant