readline: prefer 5 (fast) over 6 (slow)

Running racket in a terminal with readline 6 has excruciating delays
in response and bizarrely slow pasting. The culprit is probably a bug
in readline v6.2 that causes the rl_event_hook to be called repeatedly
even when input is ready. See also the discussion here:
http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html

It's not clear whether racket can work around the issue in readline 6,
but it can at least use readline 5 instead when it is available.
This commit is contained in:
Ryan Culpepper 2012-08-28 23:13:49 -04:00
parent ecb88ffd45
commit ae843f9a62

View File

@ -8,7 +8,7 @@
;; libtermcap needed on some platforms
(define libtermcap (with-handlers ([exn:fail? void]) (ffi-lib "libtermcap")))
(define libreadline (ffi-lib "libreadline" '("6" "5" "4" "")))
(define libreadline (ffi-lib "libreadline" '("5" "6" "4" "")))
(define make-byte-string ; helper for the two types below
(get-ffi-obj "scheme_make_byte_string" #f (_fun _pointer -> _scheme)))