branch: master
commit e5553b5f4a5c66f0e6e81933de7224f5f1c7624e
Author: Ingo Lohmar <i.loh...@gmail.com>
Commit: Ingo Lohmar <i.loh...@gmail.com>

    Fix enabling mode without saved cache file
---
 company-statistics.el |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/company-statistics.el b/company-statistics.el
index b206475..57cf092 100644
--- a/company-statistics.el
+++ b/company-statistics.el
@@ -252,10 +252,10 @@ configuration.  You can customize this behavior with
   (if company-statistics-mode
       (progn
         (unless (company-statistics--initialized-p)
-          (if company-statistics-auto-restore
-              (progn
-                (company-statistics--load) ;maybe of different size
-                (company-statistics--log-resize nil company-statistics-size))
+          (if (and company-statistics-auto-restore
+                   (company-statistics--load))
+              ;; maybe of different size
+              (company-statistics--log-resize nil company-statistics-size)
             (company-statistics--init)))
         (add-to-list 'company-transformers
                      'company-sort-by-statistics 'append)

Reply via email to