mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04:00
text direction mark
This commit is contained in:
parent
a75e8dd35c
commit
5e31308da0
@ -640,7 +640,9 @@ good_char:
|
||||
#endif /* CONFIG_COMBINE */
|
||||
part->spaces[x] = (data == UCS_SPACE);
|
||||
|
||||
if (unicode_to_cell(data) == 2) {
|
||||
if (unicode_to_cell(data) == 0)
|
||||
continue;
|
||||
else if (unicode_to_cell(data) == 2) {
|
||||
schar->data = (unicode_val_T)data;
|
||||
part->char_width[x] = 2;
|
||||
copy_screen_chars(&POS(x++, y), schar, 1);
|
||||
|
@ -605,12 +605,13 @@ invalid_arg:
|
||||
* libc version of wcwidth, and instead use a hardcoded mapping.
|
||||
*
|
||||
* @return 2 for double-width glyph, 1 for others.
|
||||
* TODO: May be extended to return 0 for zero-width glyphs
|
||||
* (like composing, maybe unprintable too).
|
||||
* 0 for unprintable glyphs (like 0x200e: "LEFT-TO-RIGHT MARK")
|
||||
*/
|
||||
NONSTATIC_INLINE int
|
||||
unicode_to_cell(unicode_val_T c)
|
||||
{
|
||||
if (c == 0x200e || c == 0x200f)
|
||||
return 0;
|
||||
if (c >= 0x1100
|
||||
&& (c <= 0x115f /* Hangul Jamo */
|
||||
|| c == 0x2329
|
||||
|
Loading…
Reference in New Issue
Block a user