From 88e2de2381a61445c20f8d35857ad57d581eafe1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 29 Dec 2015 18:49:57 +0200 Subject: [PATCH] Fix filling text with bidirectional characters in shr.el * lisp/net/shr.el (shr-insert-document): Bind bidi-display-reordering to nil while filling lines. This is required for when a line includes characters whose bidi directionality is opposite to the base paragraph direction, because columns are counted in the logical order. (Bug#22250) --- lisp/net/shr.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d5c56362f60..330f7b5d84b 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -244,7 +244,8 @@ DOM should be a parse tree as generated by (if (and (null shr-width) (not (shr--have-one-fringe-p))) (* (frame-char-width) 2) - 0)))))) + 0))))) + bidi-display-reordering) (shr-descend dom) (shr-fill-lines start (point)) (shr-remove-trailing-whitespace start (point)) -- 2.39.5