fix(#1482): adds the ability to set a prefix to winbar #1485
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.
Context
The previous implementation included the
prefixin the folder icons, which was not the intended behavior. This change corrects that mistake (that I made) and improves the flexibility of how the winbar is rendered. The new implementation ensures that folder icons are displayed according to user settings without unnecessary prefixing.Summary of Changes
This PR includes the following changes:
winbarlogic: Incorporates a customizableprefixby applying thewinbar_prefixsetting directly in thewinbar. This allows for more flexible and user-defined winbar prefixes.winbar. Previously, thewinbarprefix was always included in the folder icon representation. This change ensures that the appearance of folder icons is determined based on the configuration and is not always prefixed.winbarstring: Includes the user-definedwinbar_prefixat the beginning of the bar, improving its flexibility and appearance.Testing
A basic test has been added to verify that the
winbarcorrectly reflects the user-definedprefixand handles folder icons appropriately. The test checks the following:winbar_prefix.Review Instructions
Please review the changes, especially the new logic for handling
winbar_prefixand folder icons. Ensure that thewinbarbehaves as expected and that the new highlight group integrates seamlessly with the existing themes.