mirror of https://codeberg.org/cage/tinmop/
- prevented crash when bookmarking the start page in gemini fullscreen
mode (Thanks reDFog!).
This commit is contained in:
parent
5f8dc6c5a2
commit
8f04e4efbb
|
@ -63,6 +63,7 @@
|
|||
|
||||
(defun current-gemini-url ()
|
||||
(when (message-window:gemini-window-p)
|
||||
(let* ((metadata (message-window:metadata specials:*message-window*))
|
||||
(link (last-elt (gemini-viewer:gemini-metadata-history metadata))))
|
||||
(when-let* ((metadata (message-window:metadata specials:*message-window*))
|
||||
(history (gemini-viewer:gemini-metadata-history metadata))
|
||||
(link (last-elt history)))
|
||||
link)))
|
||||
|
|
|
@ -2276,7 +2276,12 @@ gemini page the program is rendering."
|
|||
:complete-fn #'complete:directory-complete))))
|
||||
|
||||
(defun bookmark-gemini-page ()
|
||||
(if (message-window:gemini-window-p)
|
||||
(cond
|
||||
((not (message-window:gemini-window-p))
|
||||
(error-message (_ "The window is not displaying a gemini document")))
|
||||
((not (gemini-viewer:current-gemini-url))
|
||||
(error-message (_ "This page can not be added to bookmarks")))
|
||||
(t
|
||||
(let* ((link (gemini-viewer:current-gemini-url))
|
||||
(metadata (message-window:metadata *message-window*))
|
||||
(source (gemini-viewer:gemini-metadata-source-file metadata))
|
||||
|
@ -2298,8 +2303,7 @@ gemini page the program is rendering."
|
|||
(notify (format nil (_ "Added ~s in bookmark") link))))
|
||||
(ui:ask-string-input #'on-description-completed
|
||||
:prompt (format nil (_ "Insert bookmark description: "))
|
||||
:initial-value description)))
|
||||
(error-message (_ "The window is not displaying a gemini document"))))
|
||||
:initial-value description))))))
|
||||
|
||||
(defun generate-bookmark-page ()
|
||||
(let ((bookmarks-sections (db:bookmark-all-grouped-by-section)))
|
||||
|
|
Loading…
Reference in New Issue