fix(fish): trigger prompt repaint when Enter is pressed with pager open#7462
Draft
fix(fish): trigger prompt repaint when Enter is pressed with pager open#7462
Conversation
1 task
Agent-Logs-Url: https://github.com/JanDeDobbeleer/oh-my-posh/sessions/85631a35-3415-43c1-819c-f13d73244cde Co-authored-by: JanDeDobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/JanDeDobbeleer/oh-my-posh/sessions/85631a35-3415-43c1-819c-f13d73244cde Co-authored-by: JanDeDobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix OMP repaint issue with fish pager active
fix(fish): trigger prompt repaint when Enter is pressed with pager open
Apr 12, 2026
|
I built and tested this branch on my machine at it appears to resolve the issue. My repro steps from the original issue no longer cause the bug. |
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.
When the fish completion pager is open and the user presses Enter to execute a command, OMP was not refreshing the prompt — leaving it stale (e.g. showing the old
pwdaftercd).Root cause
_omp_enter_key_handlerhad an early-return path for paging mode that calledexecuteand returned without setting_omp_new_prompt = 1. On the nextfish_promptcall, OMP saw the flag as0and echoed the cached prompt unchanged.Fix
The paging-mode branch now mirrors the normal execution path:
This ensures tooltip state, streaming cleanup, transient prompt handling, and the repaint flag are all consistent regardless of whether execution was triggered from the pager.