# HG changeset patch # User Oleksandr Gavenko # Date 1459936172 -10800 # Node ID ca2c73d8698f94953210533572ccc1a584b87ff9 # Parent a4104db1451a97056108638aa9ade441bb7ab48b Recenter also if article is found. diff -r a4104db1451a -r ca2c73d8698f 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."