UTop_main: support lambda-term 3.0
This commit is contained in:
parent
30c77ce4d7
commit
fd5bd4f665
|
@ -175,7 +175,7 @@ class read_phrase ~term = object(self)
|
||||||
in
|
in
|
||||||
super#send_action action
|
super#send_action action
|
||||||
|
|
||||||
method! exec = function
|
method! exec ?(keys=[]) = function
|
||||||
| action :: actions when S.value self#mode = LTerm_read_line.Edition &&
|
| action :: actions when S.value self#mode = LTerm_read_line.Edition &&
|
||||||
is_accept action -> begin
|
is_accept action -> begin
|
||||||
Zed_macro.add self#macro action;
|
Zed_macro.add self#macro action;
|
||||||
|
@ -205,11 +205,11 @@ class read_phrase ~term = object(self)
|
||||||
UTop_history.add_warnings UTop.stashable_session_history warnings;
|
UTop_history.add_warnings UTop.stashable_session_history warnings;
|
||||||
UTop_history.add_error UTop.stashable_session_history msg;
|
UTop_history.add_error UTop.stashable_session_history msg;
|
||||||
end;
|
end;
|
||||||
return result
|
return (LTerm_read_line.Result result)
|
||||||
with UTop.Need_more ->
|
with UTop.Need_more ->
|
||||||
(* Input not finished, continue. *)
|
(* Input not finished, continue. *)
|
||||||
self#insert (UChar.of_char '\n');
|
self#insert (UChar.of_char '\n');
|
||||||
self#exec actions
|
self#exec ~keys actions
|
||||||
end
|
end
|
||||||
| actions ->
|
| actions ->
|
||||||
super_term#exec actions
|
super_term#exec actions
|
||||||
|
|
Loading…
Reference in New Issue