summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/browser/editor.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>1999-12-09 15:14:24 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>1999-12-09 15:14:24 +0000
commitb68f4e6a5d5f24c61337cd82f59d903a1e034270 (patch)
tree02bdf0cccf63d0fac1d323e4be2948b53e4ecb98 /otherlibs/labltk/browser/editor.ml
parent25376ca5353065d4bff039fc9a83d21b9bb58fe4 (diff)
improve shell and editor
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2680 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/browser/editor.ml')
-rw-r--r--otherlibs/labltk/browser/editor.ml16
1 files changed, 1 insertions, 15 deletions
diff --git a/otherlibs/labltk/browser/editor.ml b/otherlibs/labltk/browser/editor.ml
index 2185bcb48..c98ca9d60 100644
--- a/otherlibs/labltk/browser/editor.ml
+++ b/otherlibs/labltk/browser/editor.ml
@@ -113,20 +113,6 @@ let select_shell txt =
pack [frame] side:`Bottom fill:`X expand:true;
pack [ok;cancel] side:`Left fill:`X expand:true
-let send_region txt =
- if txt.shell = None then begin
- match Shell.get_all () with [] -> ()
- | [sh] -> txt.shell <- Some sh
- | l -> select_shell txt
- end;
- match txt.shell with None -> ()
- | Some (_,sh) ->
- try
- let i1,i2 = Text.tag_nextrange txt.tw tag:"sel" start:tstart in
- sh#send (Text.get txt.tw start:(i1,[]) end:(i2,[]));
- sh#send";;\n"
- with _ -> ()
-
open Parser
let send_phrase txt =
@@ -540,7 +526,7 @@ class editor :top :menus = object (self)
edit_menu#add_command "Search..." accelerator:"C-s"
command:(fun () -> Jg_text.search_string current_tw);
edit_menu#add_command "To shell" accelerator:"M-x"
- command:(fun () -> send_region (List.hd windows));
+ command:(fun () -> send_phrase (List.hd windows));
edit_menu#add_command "Select shell..."
command:(fun () -> select_shell (List.hd windows));