Re: [vim/vim] Gvim: ligatures are reshaped when cursor moves across constituent characters (Issue #20916)
Foxe Chen (Vim Github Repository) <[email protected]> Sun, 02 Aug 2026 07:49:10 -0700
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/issues/20916/[email protected]> |
----==_mimepart_6a6f58e62f086_d611605721734
Content-Type: text/plain; charset="UTF-8"
64-bitman left a comment (vim/vim#20916)
Does this patch fix your issue?
```diff
diff --git a/src/gui.c b/src/gui.c
index 5d6eae105..e2b3b4021 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -1412,9 +1412,6 @@ gui_update_cursor(
}
break;
}
- // gui_redraw_block() may invalidate the cursor, make sure to validate
- // it again.
- gui.cursor_is_valid = true;
# ifndef USE_GTK4
if ((lig_left || lig_right) && shape->shape != SHAPE_BLOCK)
@@ -1430,6 +1427,9 @@ gui_update_cursor(
gui.col = old;
}
# endif
+ // gui_redraw_block()/gui_screenchar() may invalidate the cursor, make sure
+ // to validate it again.
+ gui.cursor_is_valid = true;
#endif
old_hl_mask = gui.highlight_mask;
```
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/issues/20916#issuecomment-5158643690
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/issues/20916/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/20916/5158643690%40github.com.
----==_mimepart_6a6f58e62f086_d611605721734
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div style=3D"display: flex; flex-wrap: wrap; white-space: pre-wrap; align-=
items: center; "><img height=3D"20" width=3D"20" style=3D"border-radius:50%=
; margin-right: 4px;" decoding=3D"async" src=3D"https://avatars.githubuserc=
ontent.com/u/60551350" /><strong>64-bitman</strong> left a comment <a href=
=3D"https://github.com/vim/vim/issues/20916#issuecomment-5158643690">(vim/v=
im#20916)</a></div>
<p dir=3D"auto">Does this patch fix your issue?</p>
<div class=3D"highlight highlight-source-diff" dir=3D"auto"><pre class=3D"n=
otranslate"><span class=3D"pl-c1">diff --git a/src/gui.c b/src/gui.c</span>
index 5d6eae105..e2b3b4021 100644
<span class=3D"pl-md">--- a/src/gui.c</span>
<span class=3D"pl-mi1">+++ b/src/gui.c</span>
<span class=3D"pl-mdr">@@ -1412,9 +1412,6 @@</span> gui_update_cursor(
}
break;
}
<span class=3D"pl-md"><span class=3D"pl-md">-</span> // gui_redraw_block=
() may invalidate the cursor, make sure to validate</span>
<span class=3D"pl-md"><span class=3D"pl-md">-</span> // it again.</span>
<span class=3D"pl-md"><span class=3D"pl-md">-</span> gui.cursor_is_valid=
=3D true;</span>
=20
# ifndef USE_GTK4
if ((lig_left || lig_right) && shape->shape !=3D SHAPE_BLOC=
K)
<span class=3D"pl-mdr">@@ -1430,6 +1427,9 @@</span> gui_update_cursor(
gui.col =3D old;
}
# endif
<span class=3D"pl-mi1"><span class=3D"pl-mi1">+</span> // gui_redraw_blo=
ck()/gui_screenchar() may invalidate the cursor, make sure</span>
<span class=3D"pl-mi1"><span class=3D"pl-mi1">+</span> // to validate it=
again.</span>
<span class=3D"pl-mi1"><span class=3D"pl-mi1">+</span> gui.cursor_is_val=
id =3D true;</span>
#endif
=20
old_hl_mask =3D gui.highlight_mask;</pre></div>
<p style=3D"font-size:small;-webkit-text-size-adjust:none;color:#666;">&mda=
sh;<br />Reply to this email directly, <a href=3D"https://github.com/vim/vi=
m/issues/20916#issuecomment-5158643690">view it on GitHub</a>, or <a href=
=3D"https://github.com/notifications/unsubscribe-auth/ACY5DGE36B27HWIOPAPDH=
RL5H5IGNAVCNFSNUABEKJSXA33TNF2G64TZHM2DAOJZG42DQMR3JFZXG5LFHM2TAMZZGEZDINJS=
GGQXMAQ">unsubscribe</a>.<br />Triage notifications, keep track of coding a=
gent tasks and review pull requests on the go with GitHub Mobile for <a hre=
f=3D"https://github.com/notifications/mobile/ios/ACY5DGDJW7QSBRFO5ASU4GD5H5=
IGNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJVHA3DIMZWHEYKM=
4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ">iOS</a> and <a hre=
f=3D"https://github.com/notifications/mobile/android/ACY5DGATX5CGJE2FOQ4UWD=
T5H5IGNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJVHA3DIMZWH=
EYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ">Android<=
/a>. Download it today!
<br />You are receiving this because you are subscribed to this thread.<img=
src=3D"https://github.com/notifications/beacon/ACY5DGH4Q5CQAZL56REOSL35H5I=
GNBFCNFSM6AAAAAC4WB347OWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3=
TUL5UWJTYAAAAACM32U7VKM4TFMFZW63VKON2WE43DOJUWEZLE.gif" height=3D"1" width=
=3D"1" alt=3D"" /><span style=3D"color: transparent; font-size: 0; display:=
none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: =
0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><vim/vi=
m/issues/20916/5158643690</span><span>@</span><span>github</span><span>.</s=
pan><span>com></span></span></p>
<script type=3D"application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/vim/vim/issues/20916#issuecomment-5158643690"=
,
"url": "https://github.com/vim/vim/issues/20916#issuecomment-5158643690",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
<p></p>
-- <br />
-- <br />
You received this message from the "vim_dev" maillist.<br />
Do not top-post! Type your reply below the text you are replying to.<br />
For more information, visit <a href=3D"http://www.vim.org/maillist.php">htt=
p://www.vim.org/maillist.php</a><br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;vim_dev" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">vim_dev+uns=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
vim_dev/vim/vim/issues/20916/5158643690%40github.com?utm_medium=3Demail&utm=
_source=3Dfooter">https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/=
20916/5158643690%40github.com</a>.<br />
----==_mimepart_6a6f58e62f086_d611605721734--