From 6cd934114631f7b614b652a30d6cfaca9adfc264 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 15 Aug 2019 17:47:39 -0500 Subject: [PATCH] Fix: (org-ql-agenda--header-line-format) Available width Could cause an error with very long queries. --- org-ql-agenda.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/org-ql-agenda.el b/org-ql-agenda.el index 54644a1..be44798 100644 --- a/org-ql-agenda.el +++ b/org-ql-agenda.el @@ -296,10 +296,10 @@ the `match' item in the custom command form." (query-formatted (propertize (org-ql-agenda--font-lock-string 'emacs-lisp-mode query-formatted) 'help-echo query-formatted)) (query-width (length query-formatted)) - (available-width (- (window-width) - (length "In: ") - (length "Query: ") - query-width 4)) + (available-width (max 0 (- (window-width) + (length "In: ") + (length "Query: ") + query-width 4))) (buffers-files-formatted (format "%S" buffers-files)) (buffers-files-formatted (propertize (->> buffers-files-formatted (org-ql-agenda--font-lock-string 'emacs-lisp-mode)