Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.

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):

@c4eater c4eater force-pushed the disable-leading-newline branch from 532b922 to 08c9ab2 Compare May 4, 2022 08:23
@c4eater c4eater force-pushed the disable-leading-newline branch from 08c9ab2 to d9c6612 Compare March 16, 2025 18:07
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).
@c4eater c4eater force-pushed the disable-leading-newline branch from d9c6612 to 7b8260f Compare March 16, 2025 18:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant