fixes for mintty
Ignore-this: 4bf6c68855167b1f094a4dde818bd000 darcs-hash:20120126105011-c41ad-159732298309c6e5e9846aed9047ec37e5c49d9c
This commit is contained in:
parent
26a241e376
commit
72c35f5518
|
@ -218,16 +218,15 @@ let read_input_non_interactive prompt buffer len =
|
|||
Lwt_main.run (Lwt_io.write Lwt_io.stdout prompt >> loop 0)
|
||||
|
||||
let init_read_interactive_input () =
|
||||
(* If standard channels are connected to a tty, use interactive
|
||||
read-line and display a welcome message: *)
|
||||
if Unix.isatty Unix.stdin && Unix.isatty Unix.stdout then begin
|
||||
(* Open the standard terminal. *)
|
||||
lwt term = Lazy.force LTerm.stdout in
|
||||
|
||||
(* If standard channels are connected to a tty, use interactive
|
||||
read-line and display a welcome message: *)
|
||||
if LTerm.incoming_is_a_tty term && LTerm.outgoing_is_a_tty term then begin
|
||||
Toploop.read_interactive_input := (read_input term);
|
||||
|
||||
(* Create a context to render the welcome message. *)
|
||||
lwt size = LTerm.get_size term in
|
||||
let size = LTerm.size term in
|
||||
let size = { rows = 3; cols = size.cols } in
|
||||
let matrix = LTerm_draw.make_matrix size in
|
||||
let ctx = LTerm_draw.context matrix size in
|
||||
|
|
Loading…
Reference in New Issue