Skip to content

Commit 6b3c2b9

Browse files
committed
Fix order of nth and fix support for unlabeled endpoint
1 parent ce55e36 commit 6b3c2b9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cider.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,10 @@ gets associated with it."
547547
(defun cider-select-endpoint ()
548548
"Interactively select the host and port to connect to."
549549
(dolist (ep cider-known-endpoints)
550-
(unless (stringp (nth ep 2))
550+
(unless (stringp (or (nth 2 ep)
551+
(nth 1 ep)))
551552
(user-error "The port for %s in `cider-known-endpoints' should be a string"
552-
(nth ep 0))))
553+
(nth 0 ep))))
553554
(let* ((ssh-hosts (cider--ssh-hosts))
554555
(hosts (seq-uniq (append (when cider-host-history
555556
;; history elements are strings of the form "host:port"

0 commit comments

Comments
 (0)