Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Indent adds spaces on empty lines #1642

Closed
antoyo opened this issue Feb 10, 2022 · 1 comment · Fixed by #1653
Closed

Indent adds spaces on empty lines #1642

antoyo opened this issue Feb 10, 2022 · 1 comment · Fixed by #1653
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@antoyo
Copy link
Contributor

antoyo commented Feb 10, 2022

Reproduction steps

Use > to indent an empty line and it will add spaces on it.
Vim won't indent empty lines which I prefer because empty lines don't usually need to be indented.

Environment

  • Platform: Linux
  • Terminal emulator: Alacritty
  • Helix version: helix v0.6.0
@antoyo antoyo added the C-bug Category: This is a bug label Feb 10, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Feb 11, 2022
@EpocSquadron
Copy link
Contributor

I agree that this often results in unintended whitespace at end of line when indenting selections that happen to include blank lines. This is problematic for languages which don't have an auto formatter active or set.

archseer added a commit that referenced this issue Feb 25, 2022
* fix(commands): don't indent empty lines

Fixes: #1642

* Apply suggestions

* Update helix-term/src/commands.rs

* Update helix-term/src/commands.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants