Fix C-a jumping to stray prompt char in command output#464
Merged
Conversation
dakra
force-pushed
the
fix-bol-stray-prompt-char
branch
from
June 24, 2026 13:49
11c6952 to
322ac11
Compare
Two complementary fixes for ghostel-beginning-of-input-or-line:
1. Cap the prompt-prefix scan at 60 columns in ghostel-prompt-regexp.
Real prompts put their symbol near BOL; a prompt char found deep in
a line (e.g. the % in a dnf "100%" progress line) is command output,
not a prompt. Replace the unbounded [^…]* with [^…]\{0,60\} so the
fallback regex cannot match past the first 60 columns.
2. Suppress the regex fallback when OSC 133 is active and a real
ghostel-prompt property exists after point. On a property-less
output line that sits above a real prompt the regex is unreliable;
prefer BOL. The check is directional (after point only) so inner
REPLs and tmux/screen prompts — which are the live bottom line with
no prompt below — are unaffected.
Closes #430
dakra
force-pushed
the
fix-bol-stray-prompt-char
branch
from
June 24, 2026 16:42
322ac11 to
962d1be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two complementary fixes for ghostel-beginning-of-input-or-line:
Cap the prompt-prefix scan at 60 columns in ghostel-prompt-regexp.
Real prompts put their symbol near BOL; a prompt char found deep in
a line (e.g. the % in a dnf "100%" progress line) is command output,
not a prompt. Replace the unbounded [^…]* with [^…]{0,60} so the
fallback regex cannot match past the first 60 columns.
Suppress the regex fallback when OSC 133 is active and a real
ghostel-prompt property exists after point. On a property-less
output line that sits above a real prompt the regex is unreliable;
prefer BOL. The check is directional (after point only) so inner
REPLs and tmux/screen prompts — which are the live bottom line with
no prompt below — are unaffected.
Closes #430