]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/lablgtk/lablgtk_20001129-0.1.0/applications/browser/text.ml
This commit was manufactured by cvs2svn to create branch 'init'.
[helm.git] / helm / DEVEL / lablgtk / lablgtk_20001129-0.1.0 / applications / browser / text.ml
diff --git a/helm/DEVEL/lablgtk/lablgtk_20001129-0.1.0/applications/browser/text.ml b/helm/DEVEL/lablgtk/lablgtk_20001129-0.1.0/applications/browser/text.ml
deleted file mode 100644 (file)
index 729f310..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-(* $Id$ *)
-
-open GEdit
-
-let line_start ?pos (text : GEdit.text) =
-  let pos = Gaux.default text#position ~opt:pos in
-  if pos = 0 then 0 else
-  let start = max 0 (pos-256) in
-  let buffer = text#get_chars ~start ~stop:pos in
-  try start + String.rindex buffer '\n' with Not_found -> 0
-
-let line_end ?pos (text : GEdit.text) =
-  let pos = Gaux.default text#position ~opt:pos in
-  if pos = text#length then text#length else
-  let buffer = text#get_chars ~start:pos ~stop:(min text#length (pos+256)) in
-  try pos + String.index buffer '\n' with Not_found -> text#length