Skip to content

Fold EOL if region ends upon it#7

Open
drcxd wants to merge 1 commit into
agzam:mainfrom
drcxd:fold-eol-if-region-ends-before-it
Open

Fold EOL if region ends upon it#7
drcxd wants to merge 1 commit into
agzam:mainfrom
drcxd:fold-eol-if-region-ends-before-it

Conversation

@drcxd

@drcxd drcxd commented Jun 17, 2026

Copy link
Copy Markdown

Hi, I find that occult-toggle does not fold the EOL if point is placed exactly on it. This leaves an "extra" space line on the screen, the EOL character. I think some people tend to mark the lines they want to fold so that the point is placed at the end of the last to-be-folded line. The current behavior of occult leaves an empty line in such use case. Thus, I propose this patch, which checks if region ends upon the EOL character, and if so, the EOL character is also folded.

For example, when selecting the region below:

image

Before:

image

After:

image

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