aboutsummaryrefslogtreecommitdiff
path: root/main.ml
diff options
context:
space:
mode:
Diffstat (limited to 'main.ml')
-rwxr-xr-xmain.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.ml b/main.ml
index 58cbea5..393d4fe 100755
--- a/main.ml
+++ b/main.ml
@@ -97,7 +97,7 @@ let rec normal_mode (t, screen) = begin
let position = Selection.extract t.Sheet.selected in
let expr = Sheet.Raw.get_expr position t.Sheet.data
|> Expression.show in
- begin match Screen.editor ~position ~init:expr screen with
+ begin match Screen.editor ~position ~prefix:(u"-> ") ~init:expr screen with
| None ->
(* Restore the previous value *)
Screen.status screen expr;
@@ -127,7 +127,7 @@ let rec normal_mode (t, screen) = begin
| Actions.Search ->
let expr = Screen.search screen
|> Expression.load in
- let pattern = Expression.eval expr (fun _ -> ScTypes.Undefined) in
+ let pattern = Expression.eval expr (fun _ -> ScTypes.Refs.Single ScTypes.Undefined) in
begin match Sheet.search (`Pattern pattern) t with
| Some t' -> normal_mode @@ redraw t' screen
| None -> normal_mode (t, screen)
@@ -155,7 +155,7 @@ let rec normal_mode (t, screen) = begin
end
| Actions.Command ->
- begin match Screen.editor ~init:(u":") screen with
+ begin match Screen.editor ~prefix:(u":") screen with
| None ->
normal_mode (t, screen)
| Some content ->
@@ -212,13 +212,13 @@ end
and command (t, screen) action = begin
match action with
- | (":w", file) -> (* Save the file *)
+ | ("w", file) -> (* Save the file *)
Odf.save t.Sheet.data file;
normal_mode @@ redraw t screen
- | (":enew", _) -> (* Start a new spreadsheet *)
+ | ("enew", _) -> (* Start a new spreadsheet *)
let sheet = Sheet.Raw.create in
normal_mode @@ redraw (Sheet.create sheet) screen
- | (":q", _) -> (* Quit *)
+ | ("q", _) -> (* Quit *)
t
| _ -> normal_mode @@ redraw t screen
end