From: Eli Zaretskii Date: Tue, 29 Dec 2015 16:49:57 +0000 (+0200) Subject: Fix filling text with bidirectional characters in shr.el X-Git-Tag: emacs-25.0.90~324 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/88e2de2381a61445c20f8d35857ad57d581eafe1 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) --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d5c56362f6..330f7b5d84 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))