macvim-dev / macvim-dev/macvim

ligatures drawn imperfectly

Open
#476 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Renderer
Dominant language
Vim Script
Stars
7.9k
Forks
691
PR merge metrics
No merged PRs in 30d

Description

i tried out the macligatures feature. with muliple fonts is see this:

  1. typing a != and leaving the cursor in insert mode, a somewhat broken 'not equal' ligature appears. when moving the cursor to the next (empty) line, this is repaired.

  2. moving the cursor from the = to the next empty line and back again a few times again reproduces the broken ligature on screen. moving the cursor further down to a nonempty line then repairs it.

  3. generally, moving the cursor onto one part of a ligature redraws the exact cursor position with the non-ligated glyph, but the adjacent positions retain chopped parts of the ligature.

it seems the problems stem from a too-local redrawing rule? better would be to redraw all characters of a ligature together, or possibly un-ligate the whole line of the cursor always.

this is the behavior with the Core renderer. with the non-core renderer i see slightly different problems. in particular when the cursor is on = the first part of the ligature stays black.

cursorline and relativenumbers disabled. filetype was python.

this exact behavior is with Fira, other fonts gave similar results. macvim 8 patch 329.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the a != case with Fira using the Core renderer, then compare it with the non-Core renderer while moving the cursor as described. Trace the redraw behavior around the cursor and ligature boundaries; done means both renderers consistently redraw the complete ligature without chopped or stale glyphs.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, vim
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.