[137547] users/chunyang/helm-ls-svn.el/helm-ls-svn.el
chunyang at macports.org
chunyang at macports.org
Sun Jun 14 00:43:18 PDT 2015
Revision: 137547
https://trac.macports.org/changeset/137547
Author: chunyang at macports.org
Date: 2015-06-14 00:43:18 -0700 (Sun, 14 Jun 2015)
Log Message:
-----------
users/chunyang: helm-ls-svn.el: Add persistent action (diff) for status source
Modified Paths:
--------------
users/chunyang/helm-ls-svn.el/helm-ls-svn.el
Modified: users/chunyang/helm-ls-svn.el/helm-ls-svn.el
===================================================================
--- users/chunyang/helm-ls-svn.el/helm-ls-svn.el 2015-06-14 07:30:59 UTC (rev 137546)
+++ users/chunyang/helm-ls-svn.el/helm-ls-svn.el 2015-06-14 07:43:18 UTC (rev 137547)
@@ -61,7 +61,6 @@
;; TODO
;; ====
;;
-;; - Implement persistent action (diff) for status source.
;; - Helm-find-files integration.
;; - Find out a suitable way to search in svn project.
;; - Improve performance.
@@ -143,8 +142,14 @@
candidates)))
(defun helm-ls-svn-diff (candidate)
- (find-file candidate)
- (call-interactively #'vc-diff))
+ (let (helm-persistent-action-use-special-display)
+ (with-current-buffer (find-file-noselect candidate)
+ (when (buffer-live-p (get-buffer "*vc-diff*"))
+ (kill-buffer "*vc-diff*")
+ (balance-windows))
+ (vc-svn-diff (list candidate) nil nil "*vc-diff*")
+ (pop-to-buffer "*vc-diff*")
+ (diff-mode))))
(defun helm-ls-svn-revert (_candidate)
(let ((marked (helm-marked-candidates)))
@@ -204,9 +209,8 @@
(helm-ls-svn-status))))
(keymap :initform helm-ls-svn-map)
(filtered-candidate-transformer :initform 'helm-ls-svn-status-transformer)
- ;; TODO: Implement persistent action
- ;; (persistent-action :initform 'helm-ls-svn-diff)
- ;; (persistent-help :initform "Diff")
+ (persistent-action :initform 'helm-ls-svn-diff)
+ (persistent-help :initform "Diff")
(action-transformer :initform 'helm-ls-svn-status-action-transformer)
(action :initform
(helm-make-actions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150614/bca0a853/attachment.html>
More information about the macports-changes
mailing list