]> code.delx.au - gnu-emacs/commitdiff
Speed up redisplay in ansi-term mode
authorEli Zaretskii <eliz@gnu.org>
Sat, 16 Apr 2016 10:08:30 +0000 (13:08 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 16 Apr 2016 10:08:30 +0000 (13:08 +0300)
* lisp/term.el (ansi-term): Force L2R 'bidi-paragraph-direction'.
(Bug#20611)

lisp/term.el

index 6fd3a5e62615ac6dd40a10bab289241d8333cdab..8cdf0c0e77c44c4a5558475213e1d3f7b8c10e3e 100644 (file)
@@ -4151,7 +4151,17 @@ the process.  Any more args are arguments to PROGRAM."
     ;; .emacs ...
     (term-set-escape-char ?\C-x))
 
-  (switch-to-buffer term-ansi-buffer-name))
+  (switch-to-buffer term-ansi-buffer-name)
+  ;; For some reason, without the below setting, ansi-term behaves
+  ;; sluggishly, not clear why, since the buffer is typically very
+  ;; small.
+  ;;
+  ;; There's a larger problem here with supporting bidirectional text:
+  ;; the application that writes to the terminal could have its own
+  ;; ideas about displaying bidirectional text, and might not want us
+  ;; reordering the text or deciding on base paragraph direction.  One
+  ;; such application is Emacs in TTY mode...  FIXME.
+  (setq bidi-paragraph-direction 'left-to-right))
 
 \f
 ;;; Serial terminals