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

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

[nongnu] elpa/hyperdrive a1c98cb709 09/20: Fix: Only show "Selected" men


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive a1c98cb709 09/20: Fix: Only show "Selected" menu for dir buffers
Date: Thu, 12 Oct 2023 19:00:41 -0400 (EDT)

branch: elpa/hyperdrive
commit a1c98cb70977b9599b53845a47515e8953fe6404
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: Only show "Selected" menu for dir buffers
---
 hyperdrive.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index a7c6a1d523..524f9ae892 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1012,19 +1012,19 @@ The return value of this function is the retrieval 
buffer."
        :active (not (eq major-mode 'hyperdrive-dir-mode))
        :help "Download current file"])
      ("Selected"
-      :label (let ((entry (hyperdrive--context-entry)))
+      :label (let ((entry-at-point (hyperdrive-dir--entry-at-point)))
                (format "Selected %s: «%s»"
-                       (if (hyperdrive--entry-directory-p entry)
+                       (if (hyperdrive--entry-directory-p entry-at-point)
                            "Directory"
                          "File")
-                       (hyperdrive-entry-name entry)))
-      :active (and (eq major-mode 'hyperdrive-dir-mode)
-                   (hyperdrive-dir--entry-at-point))
+                       (hyperdrive-entry-name entry-at-point)))
+      :visible (and (eq major-mode 'hyperdrive-dir-mode)
+                    (hyperdrive-dir--entry-at-point))
       ["Download" (lambda ()
                     (interactive)
                     (call-interactively #'hyperdrive-download))
-       :active (when-let ((entry (hyperdrive--context-entry)))
-                 (not (hyperdrive--entry-directory-p entry)))
+       :active (when-let ((entry-at-point (hyperdrive-dir--entry-at-point)))
+                 (not (hyperdrive--entry-directory-p entry-at-point)))
        ;; TODO: Change to "file/directory" when it's possible to download a 
whole directory
        :help "Download file at point"]
       ["Delete" (lambda ()
@@ -1049,8 +1049,8 @@ The return value of this function is the retrieval 
buffer."
       ["View" (lambda ()
                 (interactive)
                 (call-interactively #'hyperdrive-dir-view-file))
-       :active (when-let ((entry (hyperdrive--context-entry)))
-                 (not (hyperdrive--entry-directory-p entry)))
+       :active (when-let ((entry-at-point (hyperdrive-dir--entry-at-point)))
+                 (not (hyperdrive--entry-directory-p entry-at-point)))
        :help "View file at point"])
      ("Version"
       :label (format "Version (%s)"



reply via email to

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