0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.1038: Arabic support excludes Farsi

Problem:    Arabic support excludes Farsi.
Solution:   Add Farsi support to the Arabic support. (Ali Gholami Rudi,
            Ameretat Reith)
This commit is contained in:
Bram Moolenaar
2019-03-22 16:33:15 +01:00
parent 6b6f7aae4a
commit dc4fa190e7
11 changed files with 442 additions and 1052 deletions

View File

@@ -1911,35 +1911,6 @@ mb_cptr2char_adv(char_u **pp)
}
#if defined(FEAT_ARABIC) || defined(PROTO)
/*
* Check whether we are dealing with Arabic combining characters.
* Note: these are NOT really composing characters!
*/
int
arabic_combine(
int one, /* first character */
int two) /* character just after "one" */
{
if (one == a_LAM)
return arabic_maycombine(two);
return FALSE;
}
/*
* Check whether we are dealing with a character that could be regarded as an
* Arabic combining character, need to check the character before this.
*/
int
arabic_maycombine(int two)
{
if (p_arshape && !p_tbidi)
return (two == a_ALEF_MADDA
|| two == a_ALEF_HAMZA_ABOVE
|| two == a_ALEF_HAMZA_BELOW
|| two == a_ALEF);
return FALSE;
}
/*
* Check if the character pointed to by "p2" is a composing character when it
* comes after "p1". For Arabic sometimes "ab" is replaced with "c", which