-
-
Notifications
You must be signed in to change notification settings - Fork 686
Highlight feature "gui=strikethrough" does not display strikethrough text. #1034
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
Comments
Yeah we should add this. Maybe next release where we look at getting the renderer fix in. |
Hi, is there any update on this? Thanks. |
I forgot about this, that's all. I'm preparing a release right now, but let me see if it's easy to squeeze this in before the release. Also, interestingly, Apple's terminal still doesn't support strikethrough it seems. iTerm does though, of course. |
Actually, sorry, but I think I'll push this till r175 (the one after the coming release) since I kind of want to push it out soon, and I want to make sure I get the rendering to look correct, plus support the new Vim text styles in one go (double underline, dashed / dotted underlines). |
Add support for all the missing text styles for MacVim for Vim parity. For strikethrough, this needed to be done as a second pass to make sure they get drawn on top of the text. This is necessary because currently the logic buffers texts up before dispatching them later in a line, so it's just easier to loop through the line a second time if we detected strikethrough. For the strikethrough position, we simply use the half of xheight which seems to work best in looking good. For underdouble, the logic is a little tricky because sometimes we don't have space below the line. When that's the case, simply draw the second line on top of the first line. For underdotted, need to do something smart to space out the dots. When the width is divisible by 2, they get spaced out evenly. If they are not, try to make it work if divisible by 3. If that's not the case, we just readjust the size of dot/gap a little bit to make it fit, even though now we have non-integer sizes (from experimentation, the antialising works well enough that it's not too jarring). Also fix rendering of undercurl to work for double-width characters as well. Note that underdouble/underdotted/underdashed are not supported in regular gVim yet, and so I had to add the ifdef for those in gui.c. These may cause merge conflicts later which should be easily resolved. Known issue 1: Note that currently underline is not respecting the font's underline thickness and position. We always use a thickness of 1 pt, and hard-code a 0.4*descent position, which are not great. Thickness in particular should scale with the font size. They should be fixed in a future commit. Known issue 2: There are some current clipping bugs in the renderer. This is because the line height returned by NSLayoutManager is sometimes smaller than ascent+descent+leading, *and* MMCoreTextView for some reason takes the `ceil(descent)` (presumably to make the rendering grid-aligned). This should be fixed later. Fix macvim-dev#1034
Nevermind what I said. I'm waiting to see if Vim will stabilize a bit before I pick a good version to release on, so we are going to squeeze it in for the coming release r174 (#1287). |
Highlight feature "gui=strikethrough" does not display strikethrough text.
To Reproduce
mvim --clean
<strike>some text</strike>
or:highlight htmlStrike
Expected behavior
The highlight feature "gui=strikethrough" should show a strikethrough
Screenshots
Screenshot attached.
Environment (please complete the following information):
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 3 2020 12:05:00)
macOS version
Included patches: 1-319
Compiled by travis@Traviss-Mac.local
Huge version with MacVim GUI.
The text was updated successfully, but these errors were encountered: