let onselect mods x y nclicks =
Printf.printf "select (%d,%d) %d" x y nclicks;
print_endline "";
- edit_view := View.select_at !edit_view x y
+ match nclicks with
+ | 1 -> edit_view := View.select_at !edit_view x y
+ | 2 -> () (* edit_view := View.select_ctx_at !edit_view x y *)
+ | 3 -> () (* edit_view := View.select_line_at !edit_view x y *)
+ | _ -> ()
let onexec mods x y nclicks =
Printf.printf "exec (%d,%d) %d" x y nclicks;
- print_endline ""
+ print_endline "";
+ edit_view := View.exec_at !edit_view x y
let onfetch mods x y nclicks =
Printf.printf "fetch (%d,%d) %d" x y nclicks;
- print_endline ""
+ print_endline "";
+ edit_view := View.fetch_at !edit_view x y
(* Event functions
******************************************************************************)
let select_at ?extend:(ext=false) view x y =
select ~extend:ext view (get_at view x y)
+let exec view pos =
+ view
+
+let exec_at view x y =
+ exec view (get_at view x y)
+
+let fetch view pos =
+ view
+
+let fetch_at view x y =
+ fetch view (get_at view x y)
+
let path view =
Buf.path view.buf
val select : ?extend:bool -> t -> int -> t
val select_at : ?extend:bool -> t -> int -> int -> t
+
+val exec : t -> int -> t
+val exec_at : t -> int -> int -> t
+
+val fetch : t -> int -> t
+val fetch_at : t -> int -> int -> t
+