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

:set soft-wrap.wrap-indicator does not work with empty string #6392

Closed
sicher opened this issue Mar 21, 2023 · 2 comments
Closed

:set soft-wrap.wrap-indicator does not work with empty string #6392

sicher opened this issue Mar 21, 2023 · 2 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@sicher
Copy link

sicher commented Mar 21, 2023

Summary

I'm trying to disable the soft wrap indicator from the command line.

Reproduction Steps

I tried this:

  1. hx
  2. ':set soft-wrap.wrap-indicator ""'

I expected this to happen:

The soft wrap indicator should be disabled.

Instead, this happened:

Bad arguments. Usage: ':set key field'

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

kitty 0.26.5

Helix Version

helix 22.12 (6d5fa20)

@sicher sicher added the C-bug Category: This is a bug label Mar 21, 2023
@AlexanderBrevig
Copy link
Contributor

When trying to replicate this I first stumbled upon an oddity:
I had to have a config for it first, as in:

[editor.soft-wrap]
wrap-indicator = ""

Then I could :set soft-wrap.wrap-indicator "-" and it works as expected.

I'm pretty sure that the input of "" will be parsed away to nothing, and then it will seem that the requirement for two args to :set is no longer met.
Making it so :set uses a default value will not be good as :set soft-wrap.enable reads as if it should actually enable it, but default bool is false. Forcing boolean values to true.

Not entirely sure how we should handle this one? Maybe accept unicode like U+00A0 for non breaking space?

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Apr 13, 2024
@pascalkuthe
Copy link
Member

This is a result of the current :set parsing rules. :set \"\" works.

This will be fixed in #8853 or #10389. I haven't decided how exactly but I want to revamp the set syntax either to just use somekind of scheme evaluation or a custom syntax that doesn't rely on json parsing.

Closing in favor of those two PRs

@pascalkuthe pascalkuthe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

4 participants