1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-18 08:20:35 +01:00

- [gemini] prevented crash happening when trying to render a TOC from an empty gemtext.

This commit is contained in:
cage 2021-10-04 19:39:31 +02:00
parent 29c6f6b7d5
commit fd39d15050

View File

@ -86,7 +86,8 @@
(defun highlight-current-section (visible-rows window) (defun highlight-current-section (visible-rows window)
(declare (ignore window)) (declare (ignore window))
(when-let* ((toc-win *gemini-toc-window*) (when-let* ((toc-win *gemini-toc-window*)
(line-fields (fields (first visible-rows))) (first-row (first visible-rows))
(line-fields (fields first-row))
(gid (getf line-fields :group-id)) (gid (getf line-fields :group-id))
(index (position-if (lambda (a) (= (getf (fields a) :group-id) (index (position-if (lambda (a) (= (getf (fields a) :group-id)
gid)) gid))