Fixed line width calculation for helm source

.Was resulting in negative values on long entries and the resulting
error was being suppressed by `ignore-errors' in the source
This commit is contained in:
Ryan C. Scott 2022-03-17 12:24:59 -07:00
parent 31aeb0a250
commit dfb18f8089

View file

@ -206,7 +206,7 @@ WINDOW-WIDTH should be the width of the Helm window."
;; I'd prefer not to do. Maybe I should add a feature to `org-ql' to ;; I'd prefer not to do. Maybe I should add a feature to `org-ql' to
;; call a setup function in a buffer before running queries. ;; call a setup function in a buffer before running queries.
(let* ((prefix (concat (buffer-name) ":")) (let* ((prefix (concat (buffer-name) ":"))
(width (- window-width (length prefix))) (width (max 0 (- window-width (length prefix))))
(heading (org-get-heading t)) (heading (org-get-heading t))
(path (-> (org-get-outline-path) (path (-> (org-get-outline-path)
(org-format-outline-path width nil "") (org-format-outline-path width nil "")