patch 9.0.0666: spacing-combining characters handled as composing

Problem:    Spacing-combining characters handled as composing, causing text to
            take more space than expected.
Solution:   Handle characters marked with "Mc" not as composing.
            (closes #11282
This commit is contained in:
Bram Moolenaar
2022-10-05 18:03:00 +01:00
parent 0816f473ab
commit 7beaf6a720
3 changed files with 164 additions and 128 deletions

View File

@ -158,7 +158,8 @@ func! BuildCombiningTable()
let end = -1
let ranges = []
for p in s:dataprops
if p[2] == 'Mn' || p[2] == 'Mc' || p[2] == 'Me'
" The 'Mc' property was removed, it does take up space.
if p[2] == 'Mn' || p[2] == 'Me'
let n = ('0x' . p[0]) + 0
if start >= 0 && end + 1 == n
" continue with same range.