make sure the welcome message is correctly displayed on windows

Ignore-this: da5b08ebad927d04134a48a0958ca804

darcs-hash:20110919234918-c41ad-68a7319d9b78d4fdf77f98f5ab5c3307472c756e
This commit is contained in:
Jeremie Dimino 2011-09-20 01:49:18 +02:00
parent 7125782c8b
commit 82b2998b1b
2 changed files with 10 additions and 1 deletions

1
_oasis
View File

@ -24,6 +24,7 @@ Library "optcomp"
Path: syntax
Modules: Pa_optcomp
BuildDepends: camlp4.lib, camlp4.quotations.o
CompiledObject: byte
Library utop
Path: src

View File

@ -514,8 +514,16 @@ let init_read_interactive_input () =
LTerm_draw.draw_styled ctx 1 ((size.cols - String.length message) / 2) (eval [B_fg LTerm_style.yellow; S message]);
(* On Windows we must make sure we are not at the end of screen. *)
lwt () =
if LTerm.windows term then
LTerm.fprint term "\n\n\n\n"
else
return ()
in
(* Render to the screen. *)
lwt () = LTerm.print_box term matrix in
lwt () = LTerm.print_box term ~delta:(if LTerm.windows term then -4 else 0) matrix in
LTerm.flush term
end else begin
(* Otherwise fallback to classic non-interactive mode: *)