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

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

[elpa] master 5f030d5 381/399: counsel.el (counsel--git-log-format-funct


From: Oleh Krehel
Subject: [elpa] master 5f030d5 381/399: counsel.el (counsel--git-log-format-function): Add
Date: Sat, 20 Jul 2019 14:58:04 -0400 (EDT)

branch: master
commit 5f030d5ec14cbbe4e750089bc3cdc3a32de4c138
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel--git-log-format-function): Add
    
    Fixes #2133
---
 counsel.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/counsel.el b/counsel.el
index 03c8703..16a08b4 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1707,18 +1707,21 @@ currently checked out."
 
 (defvar counsel-yank-pop-truncate-radius)
 
+(defun counsel--git-log-format-function (str)
+  (let ((counsel-yank-pop-truncate-radius 5))
+    (counsel--yank-pop-format-function str)))
+
 ;;;###autoload
 (defun counsel-git-log ()
   "Call the \"git log --grep\" shell command."
   (interactive)
-  (let ((counsel-yank-pop-truncate-radius 5))
-    (ivy-read "Grep log: " #'counsel-git-log-function
-              :dynamic-collection t
-              :action #'counsel-git-log-action
-              :unwind #'counsel-delete-process
-              :caller 'counsel-git-log)))
+  (ivy-read "Grep log: " #'counsel-git-log-function
+            :dynamic-collection t
+            :action #'counsel-git-log-action
+            :unwind #'counsel-delete-process
+            :caller 'counsel-git-log))
 
-(add-to-list 'ivy-format-functions-alist '(counsel-git-log . 
counsel--yank-pop-format-function))
+(add-to-list 'ivy-format-functions-alist '(counsel-git-log . 
counsel--git-log-format-function))
 (add-to-list 'ivy-height-alist '(counsel-git-log . 4))
 (add-to-list 'counsel-async-split-string-re-alist '(counsel-git-log . "^commit 
"))
 (add-to-list 'counsel-async-ignore-re-alist '(counsel-git-log . "^[ \n]*$"))



reply via email to

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