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

Request for \1 and \2 (RL_PROMPT_START_IGNORE, RL_PROMPT_END_IGNORE) support #48

Open
Artoria2e5 opened this issue Apr 19, 2021 · 1 comment · May be fixed by #49
Open

Request for \1 and \2 (RL_PROMPT_START_IGNORE, RL_PROMPT_END_IGNORE) support #48

Artoria2e5 opened this issue Apr 19, 2021 · 1 comment · May be fixed by #49

Comments

@Artoria2e5
Copy link

Artoria2e5 commented Apr 19, 2021

Editline currently uses a "one byte per column" heuristic, and one way that breaks down is when it encounters colored prompts. The way readline (and libedit) handles this issue is by having the program tell it what parts of the prompt don't count into the width calculation: \1 (RL_PROMPT_START_IGNORE) starts the width-ignore area and \2 (RL_PROMPT_END_IGNORE) ends it.

See https://github.com/cdesjardins/libedit/search?q=RL_PROMPT_START_IGNORE for how it works in NetBSD libedit.

@troglobit
Copy link
Owner

Pull requests are welcome.

@Artoria2e5 Artoria2e5 linked a pull request Apr 20, 2021 that will close this issue
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 a pull request may close this issue.

2 participants