Do not store captionless bookmarks
authormalc <av1474@comtv.ru>
Wed, 19 Dec 2012 19:34:46 +0000 (19 23:34 +0400)
committermalc <av1474@comtv.ru>
Wed, 19 Dec 2012 19:34:57 +0000 (19 23:34 +0400)
main.ml

diff --git a/main.ml b/main.ml
index fc0be28..6502deb 100644 (file)
--- a/main.ml
+++ b/main.ml
@@ -5097,7 +5097,10 @@ let viewkeyboard key mask =
   | 109 ->                              (* m *)
       let ondone s =
         match state.layout with
-        | l :: _ -> state.bookmarks <- (s, 0, getanchor1 l) :: state.bookmarks
+        | l :: _ ->
+            if String.length s > 0
+            then
+              state.bookmarks <- (s, 0, getanchor1 l) :: state.bookmarks
         | _ -> ()
       in
       enttext ("bookmark: ", "", None, textentry, ondone, true)