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

Joining lines with empty line adds 2 spaces when joined #8977

Closed
erf opened this issue Dec 3, 2023 · 1 comment · Fixed by #8989
Closed

Joining lines with empty line adds 2 spaces when joined #8977

erf opened this issue Dec 3, 2023 · 1 comment · Fixed by #8989
Labels
C-bug Category: This is a bug

Comments

@erf
Copy link

erf commented Dec 3, 2023

Summary

Joining two lines with an empty line between adds 2 spaces when joined. In vim only a single space is added. No space should be added on empty lines.

A weird features is that if i move the cursor to the middle empty line and press J then move the cursor to the first line and press J there is only a single space.

Reproduction Steps

Given the following text:

abc

def

I tried this:

  1. hx
  2. JJ

I expected this to happen:
abc def

Instead, this happened (2 spaces between is not shown in markdown):
abc def

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

macOS

Terminal Emulator

Wezterm 20231122-174138-6a58a5ce

Installation Method

brew

Helix Version

helix 23.10 (f992c3b)

@erf erf added the C-bug Category: This is a bug label Dec 3, 2023
@TornaxO7
Copy link
Contributor

TornaxO7 commented Dec 4, 2023

I can tackle this

TornaxO7 added a commit to TornaxO7/helix that referenced this issue Dec 4, 2023
fixes the issue that lines with only spaces are getting
joined as well
pascalkuthe pushed a commit that referenced this issue Dec 6, 2023
* fix: #8977

fixes the issue that lines with only spaces are getting
joined as well

* reverting some renamings

* improve empty line check

* adding integration test

* reverting code block

* fix conditon check for line end

* applying suggested style
Desdaemon pushed a commit to Desdaemon/helix that referenced this issue Dec 11, 2023
…or#8989)

* fix: helix-editor#8977

fixes the issue that lines with only spaces are getting
joined as well

* reverting some renamings

* improve empty line check

* adding integration test

* reverting code block

* fix conditon check for line end

* applying suggested style
dgkf pushed a commit to dgkf/helix that referenced this issue Jan 30, 2024
…or#8989)

* fix: helix-editor#8977

fixes the issue that lines with only spaces are getting
joined as well

* reverting some renamings

* improve empty line check

* adding integration test

* reverting code block

* fix conditon check for line end

* applying suggested style
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 2, 2024
…or#8989)

* fix: helix-editor#8977

fixes the issue that lines with only spaces are getting
joined as well

* reverting some renamings

* improve empty line check

* adding integration test

* reverting code block

* fix conditon check for line end

* applying suggested style
Vulpesx pushed a commit to Vulpesx/helix that referenced this issue Jun 7, 2024
…or#8989)

* fix: helix-editor#8977

fixes the issue that lines with only spaces are getting
joined as well

* reverting some renamings

* improve empty line check

* adding integration test

* reverting code block

* fix conditon check for line end

* applying suggested style
smortime pushed a commit to smortime/helix that referenced this issue Jul 10, 2024
…or#8989)

* fix: helix-editor#8977

fixes the issue that lines with only spaces are getting
joined as well

* reverting some renamings

* improve empty line check

* adding integration test

* reverting code block

* fix conditon check for line end

* applying suggested style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants