Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

[Bugfix] Fix icons cut off in RPROMPT segments #966

Merged
merged 4 commits into from
Feb 1, 2019

Conversation

ytang
Copy link
Contributor

@ytang ytang commented Aug 22, 2018

This PR is a follow-up to #854, thanks to the comment by @IevgenSobko. Specifically, visual identifiers in RPROMPT were still cut off because of the color reset. The fix is even simpler than the previous PR: just remove the %f after the visual identifier.

Here is a screenshot showing the cut-off before (the first line) and after (the second line) applying the patch:
powerlevel9k-fix-rprompt-icons-cut-off

@TheTyrius
Copy link

TheTyrius commented Oct 12, 2018

Thanks for yet another fix! This is important to me, as adding a space after the icon as suggested by the readme does no longer seem to be a workaround in konsole. It seems like the space now has the same background color as the segment, and still overdraws the right part of the glyph.

Am I understanding correctly that this PR is scheduled to land in 0.7.0?

@bhilburn
Copy link
Member

@ytang - Thanks so much for this PR! Sorry it's taken us a few weeks to circle around to it.

There are now conflicts with the merge due to the change in the color naming that was merged in a different PR. They look pretty straight-forward to resolve, though.

@dritter - I see you tagged this one for v0.7.0, and we for sure need to port it over to the new codebase. I think this one is probably also worth merging into master, here, as soon as we can since it's a useful bugfix. Thoughts?

@dritter
Copy link
Member

dritter commented Oct 12, 2018

I agree, this is also worth merging into master.
And as @LordTyrius pointed out, this fix is only for older Konsole versions. For newer Konsole versions this won't work, and this needs to be fixed on Konsole's side AFAIR.

@ytang
Copy link
Contributor Author

ytang commented Oct 12, 2018

FYI, test/segments/context.spec also fails in master and should be unrelated to my patch.

@dritter
Copy link
Member

dritter commented Oct 12, 2018

@ytang I created #1020 to fix the issues with context.spec.

Copy link
Member

@dritter dritter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thx @ytang .

It is safe to remove the end-foreground-color code (%f), because every segment prints is own start-foreground-color code.

@dritter dritter merged commit bd340d4 into Powerlevel9k:master Feb 1, 2019
@dritter
Copy link
Member

dritter commented Feb 1, 2019

Thx @ytang .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants