Skip to content
Unverified Commit fa583cfb authored by Marc Khouri's avatar Marc Khouri Committed by GitHub
Browse files

refactor(pygmalion): simplify theme logic and prompt sequences (#12550)

* Simplify Pygmalion Theme

The Pygmalion theme previously had some logic for counting line length and taking action based on line length. The action was removed in c52441b6, but the counting still needlessly happens. 

This commit removes the code to count line length, and simplifies the Pygmalion theme by moving the "precmd" into the setup. 

As a bonus unintended side effect, this makes the Pygmalion theme compatible with the current async prompting logic (i.e. after this change, Pygmalion is no longer affected by https://github.com/ohmyzsh/ohmyzsh/issues/12328

)

* refactor(pygmalion): redo and simplify prompt sequences

With this commit we put the minimal needed color resets, i.e. only
when we don't control the previous text we need to do a full reset.
Otherwise we can just use %F{} to change only the foreground color.

Co-authored-by: default avatarMarc Cornellà <marc@mcornella.com>
parent 5b37e218
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment