From 92e2d19fe787ce73db15d1549880b54743c0d929 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 3 Mar 2022 15:53:04 +0200 Subject: [PATCH] One more fix of the BPA implementation * src/bidi.c (bidi_find_bracket_pairs): Disable BPA optimization when there are no strong directional characters inside the bracketed pair. (Bug#54219) --- src/bidi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bidi.c b/src/bidi.c index 5f47d9e9a7c..a548960048a 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -2758,6 +2758,7 @@ bidi_find_bracket_pairs (struct bidi_it *bidi_it) (which requires the display engine to copy the cache back and forth many times). */ if (maxlevel == base_level + && (l2r_seen || r2l_seen) /* N0d */ && ((base_level == 0 && !r2l_seen) || (base_level == 1 && !l2r_seen))) {