-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix drawing of wide characters in InfoWindow #3919
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
Conversation
|
I think
However this should still be improvement over what we had before, and I think similar issues already exist elsewhere in micro. |
|
Thank you already for picking it up, since I had no time yet to proceed with #3516. 👍 |
|
I've noticed at least two regressions:
This certainly has to do with the issue I noticed above.
So... the existing code may be buggy as hell, but do we understand why exactly the existing code does what it does, and where exactly the bug is in it? |
I also noticed this but didn't address it since it's unrelated to the rendering of wide characters. I looked into it a bit more just now and I think this is what's happening:
edit: It's also worth noting that fake cursors (used for selections & non-primary multicursors) in bufwindow always stay visible when opening infowindow. This is good (probably intended?) because some commands do something with the active selections. The only cursor behaving weirdly is the real one. I guess the proper fix would be to make infowindow scroll horizontally the same way bufwindow does. I'd prefer for that to be a separate issue and PR though because it's a less trivial change. |
|
Ok, somehow I thought I didn't see the 2nd issue on master, so I thought it was caused by this PR (in some mysterious way). Now I've double-checked that I see it on master as well, so it is unrelated to this PR. Your updated version of this PR seems correct (at least at first glance), so we can probably merge it. (But the 2nd commit would be better squashed into the 1st one, since it fixes a bug caused by the 1st one).
Yep, there is a bug #2527 for that. |
|
BTW the 1st issue, I guess, was caused by the fact that, IIRC, RuneWidth() returns 0 for the tab character. |
This brings InfoWindow rendering closer to what BufWindow does. Wide characters are no longer rendered as
@(even if they are cut off – if we want to change that then we should do it in BufWindow as well).closes #2277
closes #3514
closes #3918