[fix] make <f2> open the layer source instead of gh-md
Since helm-spacemacs//layer-action-open-file shares between first and second actions, we always want second action to open file. For that reason, we set helm-prefix-arg before calling the function.
This commit is contained in:
parent
3f41fdb19c
commit
a8394e4aca
|
@ -112,14 +112,15 @@
|
|||
(concat (ht-get configuration-layer-paths
|
||||
(intern candidate))
|
||||
candidate)))))
|
||||
(if helm-current-prefix-arg
|
||||
(find-file (concat path file))
|
||||
(if (or (equal (file-name-extension file) "md")
|
||||
helm-current-prefix-arg)
|
||||
(condition-case nil
|
||||
(with-current-buffer (find-file-noselect (concat path file))
|
||||
(gh-md-render-buffer)
|
||||
(kill-this-buffer))
|
||||
;; if anything fails, fall back to simply open file
|
||||
(find-file (concat path file))))))
|
||||
(find-file (concat path file)))
|
||||
(find-file (concat path file)))))
|
||||
|
||||
(defun helm-spacemacs//layer-action-open-readme (candidate)
|
||||
"Open the `README.md' file of the passed CANDIDATE."
|
||||
|
|
Loading…
Reference in a new issue