Fix: very first word inserted in second position, should at first.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 14 Apr 2016 19:30:18 +0300
changeset 440 fb584cf490db
parent 439 20e2e561fb14
child 441 1a49797cea41
Fix: very first word inserted in second position, should at first.
contrib/gadict.el
--- a/contrib/gadict.el	Sun Apr 10 13:12:20 2016 +0300
+++ b/contrib/gadict.el	Thu Apr 14 19:30:18 2016 +0300
@@ -139,8 +139,8 @@
     (backward-char)))
 
 (defun gadict-search-floor (headword)
-  "Move to HEADWORD definition or place before definition should
-be placed. Check for headwords ordering during search.
+  "Move to HEADWORD definition or place on posiiton for new corresponding
+definition. Check for headwords ordering during search.
 
 Return `t' if definition found, `nil' if no such headword."
   (interactive (list (read-string "Headword: ")))
@@ -154,6 +154,7 @@
       (when (string= headword prev)
         (throw 'exit t))
       (when (string< headword prev)
+        (goto-char (point-min))
         (throw 'exit nil))
       (while t
         (unless (re-search-forward "^__$" nil t)