diff options
| author | Eli Zaretskii | 2024-02-26 19:26:04 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2024-02-26 19:26:04 +0200 |
| commit | 76fa7f1f2fb7fbc3dcbd0be7928d0ec112e532e7 (patch) | |
| tree | ce1722a98a5bad092ebf80ee385984329cad293f | |
| parent | 1687adcb5c93b490e2e7edcd14615af295e791ed (diff) | |
| download | emacs-76fa7f1f2fb7fbc3dcbd0be7928d0ec112e532e7.tar.gz emacs-76fa7f1f2fb7fbc3dcbd0be7928d0ec112e532e7.zip | |
Fix display of reordered Arabic text
* src/xdisp.c (compute_stop_pos): Fix a year-old thinko in
handling auto-composed characters. It was introduced as part
of solving bug#62780, which optimized the search for composable
characters. (Bug#69384)
| -rw-r--r-- | src/xdisp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 4d60915f31c..d03769e2a31 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4345,10 +4345,7 @@ compute_stop_pos (struct it *it) | |||
| 4345 | } | 4345 | } |
| 4346 | } | 4346 | } |
| 4347 | 4347 | ||
| 4348 | if (it->cmp_it.id < 0 | 4348 | if (it->cmp_it.id < 0) |
| 4349 | && (STRINGP (it->string) | ||
| 4350 | || ((!it->bidi_p || it->bidi_it.scan_dir >= 0) | ||
| 4351 | && it->cmp_it.stop_pos <= IT_CHARPOS (*it)))) | ||
| 4352 | { | 4349 | { |
| 4353 | ptrdiff_t stoppos = it->end_charpos; | 4350 | ptrdiff_t stoppos = it->end_charpos; |
| 4354 | 4351 | ||
| @@ -4357,7 +4354,9 @@ compute_stop_pos (struct it *it) | |||
| 4357 | characters to that position. */ | 4354 | characters to that position. */ |
| 4358 | if (it->bidi_p && it->bidi_it.scan_dir < 0) | 4355 | if (it->bidi_p && it->bidi_it.scan_dir < 0) |
| 4359 | stoppos = -1; | 4356 | stoppos = -1; |
| 4360 | else if (cmp_limit_pos > 0) | 4357 | else if (!STRINGP (it->string) |
| 4358 | && it->cmp_it.stop_pos <= IT_CHARPOS (*it) | ||
| 4359 | && cmp_limit_pos > 0) | ||
| 4361 | stoppos = cmp_limit_pos; | 4360 | stoppos = cmp_limit_pos; |
| 4362 | /* Force composition_compute_stop_pos avoid the costly search | 4361 | /* Force composition_compute_stop_pos avoid the costly search |
| 4363 | for static compositions, since those were already found by | 4362 | for static compositions, since those were already found by |