From 2b0734d76e6c6084654f52da4e8fb8aa02adbcd4 Mon Sep 17 00:00:00 2001 From: "Andre A. Gomes" Date: Thu, 20 Feb 2025 11:05:36 +0300 Subject: [PATCH] status(format-status-url): Refactor scheme checks. --- source/status.lisp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/status.lisp b/source/status.lisp index d363d983477..b5926fb9bc0 100644 --- a/source/status.lisp +++ b/source/status.lisp @@ -236,12 +236,11 @@ By default, renders a hourglass when loading a URL." "Format the current URL for the STATUS buffer." (let* ((buffer (current-buffer (window status))) (url (url buffer)) - (url-display - (cond ((equalp (quri:uri-scheme url) "https") - (quri:uri-host url)) - ((equalp (quri:uri-scheme url) "http") - (format nil "! ~a" (render-url url))) - (t (render-url url))))) + (url-display (cond ((quri:uri-https-p url) + (quri:uri-host url)) + ((quri:uri-http-p url) + (format nil "! ~a" (render-url url))) + (t (render-url url))))) (spinneret:with-html-string (:nbutton :buffer status :text url-display :title (title buffer) '(nyxt:set-url)))))