emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company 14bfcc0 3/6: Minor touches


From: ELPA Syncer
Subject: [elpa] externals/company 14bfcc0 3/6: Minor touches
Date: Fri, 26 Mar 2021 21:57:09 -0400 (EDT)

branch: externals/company
commit 14bfcc0200075d912ebb16363f04ca74b5ac8f21
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Minor touches
    
    #1070
---
 company.el              | 11 +++++------
 test/frontends-tests.el |  1 +
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/company.el b/company.el
index 7fc0770..149e15b 100644
--- a/company.el
+++ b/company.el
@@ -64,7 +64,6 @@
 (require 'cl-lib)
 (require 'newcomment)
 (require 'pcase)
-(require 'find-func)
 
 ;;; Compatibility
 (eval-and-compile
@@ -1422,12 +1421,12 @@ end of the match."
     (struct . "symbol-structure.png")
     (variable . "symbol-variable.png")))
 
-(defconst company-package-root
+(defconst company-icons-root
   (file-name-as-directory
    (expand-file-name "icons"
-                     (file-name-directory (find-library-name "company")))))
+                     (file-name-directory (or load-file-name 
buffer-file-name)))))
 
-(defcustom company-icon-size 15
+(defcustom company-icon-size 30
   "Default icons size."
   :type 'integer)
 
@@ -1455,14 +1454,14 @@ end of the match."
 (defun company-vscode-dark-icons-margin-function (candidate selected)
   "Margin function which returns icons from vscode's dark theme."
   (company--icons-margin-function company-vscode-icons-mapping
-                                  (expand-file-name "vscode-dark" 
company-package-root)
+                                  (expand-file-name "vscode-dark" 
company-icons-root)
                                   candidate
                                   selected))
 
 (defun company-vscode-light-icons-margin-function (candidate selected)
   "Margin function which returns icons from vscode's light theme."
   (company--icons-margin-function company-vscode-icons-mapping
-                                  (expand-file-name "vscode-light" 
company-package-root)
+                                  (expand-file-name "vscode-light" 
company-icons-root)
                                   candidate
                                   selected))
 
diff --git a/test/frontends-tests.el b/test/frontends-tests.el
index 396b854..a1301ac 100644
--- a/test/frontends-tests.el
+++ b/test/frontends-tests.el
@@ -272,6 +272,7 @@
 (ert-deftest company-create-lines-with-icons-format-function ()
   :tags '(gui)
   (let* (company-show-numbers
+         (company-icon-size 15)
          (company-candidates '("ArrayList"))
          (company-candidates-length 1)
          (default-directory company-package-root)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]