wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Disable Ligatures under cursor

Open Kaikacy opened this issue 10 months ago • 5 comments

It would be nice if there was an option to disable ligatures under cursor, like kitty and ghostty. I am aware that this is a complicated problem or feature, but it really helps. also I opened same issue on st's ligatures patch repo cog1to/st-ligatures/issues/39

Kaikacy avatar Feb 12 '25 12:02 Kaikacy

It was actually first implemented this way, and was later changed once we managed to show the cursor without disabling the current ligature.

What is already possible now is to (temporarily) toggle all ligatures with a keybind in your config, would that be enough?

bew avatar Feb 12 '25 12:02 bew

Let me chime in even though I am not an OP.

It was actually first implemented this way, and was later changed once we managed to show the cursor without disabling the current ligature.

Perhaps that (existence of such code in git's history) makes it easier to implement this feature (which, by your description was considered a bug earlier)?

What is already possible now is to (temporarily) toggle all ligatures with a keybind in your config, would that be enough?

That's not the same and would be bit too jarring and distracting I think (also this is already possible today). Same as OP, I would like to be able to see (make it configurable?) text without ligatures under cursor only.

gegoune avatar Feb 12 '25 13:02 gegoune

Yeah, if it was already implemented, I'm guessing it wouldn't be too hard to bring it back as an option

Kaikacy avatar Feb 13 '25 11:02 Kaikacy

it was never an option before, and bringing it back is not simple. It was a bug with clustering and rendering that was outright wrong; it isn't the behavior that you want.

Having ligatures change around the cursor is not simple; it requires re-clustering and re-shaping the line based on the cursor position and has increased code complexity and performance overheads.

My pragmatic stance on this is that if you have a font with ligatures that you don't like/understand, you should probably either turn off ligatures or pick a different font!

If you don't want ligatures to be enabled, you can disable them either permanently in your config, or add a key assignment to quickly toggle if desired.

I personally have no plans to work on this; it's a lot of work with negative long term maintenance impact.

wez avatar May 17 '25 17:05 wez

I understand. lots of users don't really care, for such a small enhancement, which can be solved easily or current behavior is also fine.

Kaikacy avatar May 20 '25 13:05 Kaikacy