wego
wego copied to clipboard
Table misalignment
I think maybe my pull request introduced an issue. The wind speed line is misaligned on all terminals now. The weird thing is, it was working earlier just fine, and now it's suddenly broken. I didn't change anything, so I'm not sure what's going on. I tried it in urxvt, xterm, and xfce4-terminal.
What it looked like before my changes:
What it looked like after (but before my pull request, this screenshot is from my changes before uploading them):
And now it looks like this:
Did you change your font or terminal setup? Iirc the arrow in the wind line is an "east asian ambiguous width" character which can take up one or two spaces. This depends on font and terminal setup.
No I didn't. That's the weird thing, it just changed at some point. Oddly enough, I checked my desktop and it's changed there too, even though I hadn't booted into Linux in two weeks on that. And it was the old version of wego on there. I can't begin to imagine what's happened. I assume it's still working correctly for you after the changes?
Also dropping out of X11 and running wego from the console has the same issue.
Oops. Uhhh, wrong button sorry.
I can confirm the same issue happens to me as well both before and after your temperature patch.
I haven't used wego in a while and currently don't have the time to debug this, but here are some pointers:
https://github.com/mattn/go-runewidth is used to compute the real width of strings and it is used here: https://github.com/schachmat/wego/blob/master/frontends/ascii-art-table.go#L31
Maybe the implementation of runewidth changed over the last two years and now it's behaving differently… I should have vendored away the dependencies back when it was working… :/
Hmm... But it's strange because it was working even after my patch, and only broke later. Another solutuon could be to have an option in the config to use letters for wind direction, like N, NW, etc.
I wasn't aware you didn't use this program anymore. I'll have a look at runewidth and see if I can fix it, but I'm not really a programmer.
Hey, what do you think of the arrows being letter directions, like N, NW, etc.? The arrows are kinda hard to see on all the terminals I've tried so far anyway. And I tried changing it to letters and it seems a bit more easy to read. I don't know how to make it a config file option but that might be a good idea.
Just submitted a PR fixing this. If we select a diagonal arrow, we need to increase the padding by 1.
Personally I prefer the arrows to letter directions
I find that the lines with
℃
and …
are wrong too.
Is that related to that?