summaryrefslogtreecommitdiff
path: root/src/composite.c
diff options
context:
space:
mode:
authorPip Cet <pipcet@gmail.com>2020-06-05 12:54:01 +0000
committerEli Zaretskii <eliz@gnu.org>2020-07-25 19:19:27 +0300
commitefdd4632c95cc6be6efc099cfed051022fff7a84 (patch)
tree2786f4588d1edcbdf1b62f0b5e0ff35cd021bb89 /src/composite.c
parentd5acc509415869bce22c49ae311f2960494a0bdc (diff)
downloademacs-efdd4632c95cc6be6efc099cfed051022fff7a84.tar.gz
Fix Arabic shaping when column-number-mode is in effect
* src/indent.c (scan_for_column, compute_motion): Pass -1, instead of NEUTRAL_DIR, to 'composition_reseat_it'. * src/composite.c (composition_reseat_it): Interpret negative value of BIDI_LEVEL to mean the caller doesn't know what is the bidi direction of the text. (Bug#41005)
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/composite.c b/src/composite.c
index 364d5c9316e..2fbe6796b59 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1217,7 +1217,9 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
continue;
if (charpos < endpos)
{
- if ((bidi_level & 1) == 0)
+ if (bidi_level < 0)
+ direction = Qnil;
+ else if ((bidi_level & 1) == 0)
direction = QL2R;
else
direction = QR2L;