Recenter also if article is found.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 06 Apr 2016 12:49:32 +0300
changeset 435 ca2c73d8698f
parent 434 a4104db1451a
child 436 50bffd6cd389
Recenter also if article is found.
contrib/gadict.el
--- a/contrib/gadict.el	Sat Apr 02 00:39:10 2016 +0300
+++ b/contrib/gadict.el	Wed Apr 06 12:49:32 2016 +0300
@@ -136,8 +136,7 @@
   (when headword
     (insert headword)
     (insert "\n  []")
-    (backward-char))
-  (recenter-top-bottom))
+    (backward-char)))
 
 (defun gadict-search-floor (headword)
   "Move to HEADWORD definition or place before definition should
@@ -176,7 +175,8 @@
   "Insert new article template with respect of headword order."
   (interactive (list (read-string "Headword: ")))
   (unless (gadict-search-floor headword)
-    (gadict-insert-template headword)))
+    (gadict-insert-template headword))
+  (recenter-top-bottom))
 
 (defun gadict-setup-keymap ()
   "Setup gadict keymap."