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

Tmux status line redraw issue when emoji is present. #2195

Closed
mlhadi opened this issue Feb 8, 2022 · 1 comment
Closed

Tmux status line redraw issue when emoji is present. #2195

mlhadi opened this issue Feb 8, 2022 · 1 comment

Comments

@mlhadi
Copy link

mlhadi commented Feb 8, 2022

Hi,

Tmux status line does not redraw properly, causing the status line to be appended at the end of the screen everytime the segment refreshes.

My tmux default.json file:

{
    "segments": {
        "right": [
            {
                "function": "powerline.segments.common.sys.uptime",
                "priority": 50
            },
            {
                "function": "powerline.segments.common.time.date"
            },
            {
                "function": "powerline.segments.common.time.date",
                "name": "time",
                "args": {
                    "format": "%H:%M",
                    "istime": true
                }
            },
            {
                "function": "powerline.segments.common.bat.battery"
            },
            {
                "function": "powerline.segments.common.net.hostname"
            }
        ]
    }
}

The appended status bar:
image

I then changed the default.json to:

{
    "segments": {
        "right": [
            {
                "function": "powerline.segments.common.sys.uptime",
                "priority": 50
            },
            {
                "function": "powerline.segments.common.time.date"
            },
            {
                "function": "powerline.segments.common.time.date",
                "name": "time",
                "args": {
                    "format": "%H:%M",
                    "istime": true
                }
            },
            {
                "function": "powerline.segments.common.bat.battery",
                "args": {
                    "online": "C",
                    "format": "{ac_state} {capacity:3.0%}"
                }
            },
            {
                "function": "powerline.segments.common.net.hostname"
            }
        ]
    }
}

Changing the online argument to just the character C (or even an empty string) seems to make the problem go away. Presumably, when the symbol is being inserted as ac_state, this causes some printing issue? I have no idea.
image

I'm using Ubuntu 18.04.5 on WSL1. Not really a big issue for me, but the it suddenly came up and I noticed it's because of the lightning symbol. My laptop is usually always connected to the power adapter, but it won't charge depending on the current battery level, so when I first put up the battery segment, the symbol was not there (for some reason).

Then a couple of days after, when I was opening up a tmux session, that's when it started.

@PH111P
Copy link
Member

PH111P commented Feb 23, 2022

This is a known issue, please see #1652.
(TL;DR: choose a different font. :/)

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

No branches or pull requests

2 participants