Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powerline character width issues #741

Closed
jgoz opened this issue Jun 20, 2016 · 13 comments
Closed

Powerline character width issues #741

jgoz opened this issue Jun 20, 2016 · 13 comments

Comments

@jgoz
Copy link

@jgoz jgoz commented Jun 20, 2016

Versions

ConEmu build: 160612 x64, 160619 x64
OS version: Windows 10 x64
Used shell version: cygwin + zsh

Problem description

Certain unicode characters are being rendered with the wrong width, especially those from Powerline fonts. This is causing incorrect character rendering and alignment issues with my prompt.

Possibly related to #722.

Additional files

160609
conemu-160609

160612, 160619
conemu-160612

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Jun 20, 2016

To be sure, what is 283-ko-grid...?
Why it's centered in last version?

@jgoz
Copy link
Author

@jgoz jgoz commented Jun 20, 2016

That is the name of the active git branch I'm working on. The name is irrelevant but it should be right-aligned as in the first screenshot

@MetricMike
Copy link

@MetricMike MetricMike commented Jun 22, 2016

Also running into the same issue. For context, I think jgoz and I are both using prezto themes (I'm pretty sure he's using sorin's and I'm on paradox) that take advantage of zsh's right-hand prompt. The way I've seen it described, most themes that take advantage of a right-hand and left-prompt on the same line do math in a before block to calculate the needed padding.

I've tried several prompts that only use the left-hand prompt or a "static" combined prompt (I'm making up terms here, pls forgive) and they don't appear to have this issue. The Sorin and Paradox themes use a "dynamic" combined prompt that I think is redrawing the entire line with new padding everytime it receives a character.

image

Sorin and Paradox are disagreeing on how big the line actually is, but neither are rendering spaces at the correct width.

Sorin:
image

Paradox:
image

Using zsh with prezto/yadr
Using Windows 10 x64 Build 14367.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Jun 22, 2016

It would be nice to know, how to configure zsh prompt. Or maybe you are using standard zsh prompt?

@MetricMike
Copy link

@MetricMike MetricMike commented Jun 22, 2016

I've been researching the most of the night. It looks like zsh provides some functionality is being provided by zsh, some is being provided by oh-my-zsh, and more by prezto (a fork/rewrite of oh-my-zsh) but the documentation and commit messages on any of those 3 projects aren't explicit about what's going on.

I can confirm that this problem does not exist in the 20160609 build, but it also doesn't occur in a couple (like 3, so not exhaustive) of prompts written against oh-my-zsh instead of prezto.

@MetricMike
Copy link

@MetricMike MetricMike commented Jun 22, 2016

I also didn't answer the question. You can switch between prezto prompts by prompt THEME_NAME, so like I was typing 'prompt paradoxandprompt sorin` before those screenshots.

I was also using the default install of the swkp/dotfiles repository which is targeted at Mac OS X, but works pretty well on Windows/Linux minus some symbols.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Jun 22, 2016

I have oh-my-zsh installed. What shall I do next?

2016-06-22_10-02-16

@jgoz
Copy link
Author

@jgoz jgoz commented Jun 22, 2016

@MetricMike and I are using Prezto rather than Oh-my-zsh, which is why prompt is not working for you. But I think you might be able to see the same behaviour with Oh-my-zsh.

As per the Themes docs:

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Jun 26, 2016

Can you please do Dump screen... and post here links? SystemMenu/Debug

I'm interested in those lines, where symbol > exists and [time] or branch is shifted from the right to left.

Maximus5 added a commit that referenced this issue Jul 8, 2016
  Use ‘elasticity’ to evaluate part compression. In progress...
Maximus5 added a commit that referenced this issue Jul 8, 2016
  So, symbols are expected to be painted properly, uncropped.
  Examples: U+276F (❯), U+2794 (➔), U+27F6 (⟶).
@jgoz
Copy link
Author

@jgoz jgoz commented Jul 11, 2016

Confirmed working in build 160710. Recommend closing issue - @MetricMike?

@MetricMike
Copy link

@MetricMike MetricMike commented Jul 11, 2016

Confirmed working for me too on 160710. Sry about the extra confused emoji, there's no way to remove github reactions.

@jgoz
Copy link
Author

@jgoz jgoz commented Jul 11, 2016

Thanks @Maximus5!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.