diff options
Diffstat (limited to 'cider-client.el')
-rw-r--r-- | cider-client.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cider-client.el b/cider-client.el index b07954eb..1e7439b6 100644 --- a/cider-client.el +++ b/cider-client.el @@ -1150,11 +1150,13 @@ default connection." "Rotate and display the default nREPL connection." (interactive) (cider-ensure-connected) - (setq cider-connections - (append (cdr cider-connections) - (list (car cider-connections)))) - (message "Default nREPL connection: %s" - (cider--connection-info (car cider-connections)))) + (if (= (length (cider-connections)) 1) + (user-error "There's just a single active nREPL connection") + (setq cider-connections + (append (cdr cider-connections) + (list (car cider-connections)))) + (message "Default nREPL connection: %s" + (cider--connection-info (car cider-connections))))) (defun cider-replicate-connection (&optional conn) "Establish a new connection based on an existing connection. |