diff options
| author | Pip Cet | 2020-06-05 12:54:01 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2020-07-25 19:19:27 +0300 |
| commit | efdd4632c95cc6be6efc099cfed051022fff7a84 (patch) | |
| tree | 2786f4588d1edcbdf1b62f0b5e0ff35cd021bb89 | |
| parent | d5acc509415869bce22c49ae311f2960494a0bdc (diff) | |
| download | emacs-efdd4632c95cc6be6efc099cfed051022fff7a84.tar.gz emacs-efdd4632c95cc6be6efc099cfed051022fff7a84.zip | |
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)
| -rw-r--r-- | src/composite.c | 4 | ||||
| -rw-r--r-- | src/indent.c | 4 |
2 files changed, 5 insertions, 3 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, | |||
| 1217 | continue; | 1217 | continue; |
| 1218 | if (charpos < endpos) | 1218 | if (charpos < endpos) |
| 1219 | { | 1219 | { |
| 1220 | if ((bidi_level & 1) == 0) | 1220 | if (bidi_level < 0) |
| 1221 | direction = Qnil; | ||
| 1222 | else if ((bidi_level & 1) == 0) | ||
| 1221 | direction = QL2R; | 1223 | direction = QL2R; |
| 1222 | else | 1224 | else |
| 1223 | direction = QR2L; | 1225 | direction = QR2L; |
diff --git a/src/indent.c b/src/indent.c index f7db42783c1..939e5931db0 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -598,7 +598,7 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol) | |||
| 598 | if (cmp_it.id >= 0 | 598 | if (cmp_it.id >= 0 |
| 599 | || (scan == cmp_it.stop_pos | 599 | || (scan == cmp_it.stop_pos |
| 600 | && composition_reseat_it (&cmp_it, scan, scan_byte, end, | 600 | && composition_reseat_it (&cmp_it, scan, scan_byte, end, |
| 601 | w, NEUTRAL_DIR, NULL, Qnil))) | 601 | w, -1, NULL, Qnil))) |
| 602 | composition_update_it (&cmp_it, scan, scan_byte, Qnil); | 602 | composition_update_it (&cmp_it, scan, scan_byte, Qnil); |
| 603 | if (cmp_it.id >= 0) | 603 | if (cmp_it.id >= 0) |
| 604 | { | 604 | { |
| @@ -1506,7 +1506,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1506 | if (cmp_it.id >= 0 | 1506 | if (cmp_it.id >= 0 |
| 1507 | || (pos == cmp_it.stop_pos | 1507 | || (pos == cmp_it.stop_pos |
| 1508 | && composition_reseat_it (&cmp_it, pos, pos_byte, to, win, | 1508 | && composition_reseat_it (&cmp_it, pos, pos_byte, to, win, |
| 1509 | NEUTRAL_DIR, NULL, Qnil))) | 1509 | -1, NULL, Qnil))) |
| 1510 | composition_update_it (&cmp_it, pos, pos_byte, Qnil); | 1510 | composition_update_it (&cmp_it, pos, pos_byte, Qnil); |
| 1511 | if (cmp_it.id >= 0) | 1511 | if (cmp_it.id >= 0) |
| 1512 | { | 1512 | { |