Skip to content

Commit

Permalink
Merge pull request #1687 from nmccamish/dedup-compute-line-call
Browse files Browse the repository at this point in the history
Deduplicate compute-line calls
  • Loading branch information
cxxxr authored Dec 6, 2024
2 parents 8b822cd + fd93f00 commit 1c775fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ext/line-numbers.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ With a positive universal argument, use relative line numbers. Also obey the glo

(defmethod lem-core:compute-left-display-area-content ((mode line-numbers-mode) buffer point)
(when (buffer-filename (point-buffer point))
(let* ((string (format nil (variable-value 'line-number-format :default buffer) (compute-line buffer point)))
(attribute (if (eq (compute-line buffer point)
(let* ((computed-line (compute-line buffer point))
(string (format nil (variable-value 'line-number-format :default buffer) computed-line))
(attribute (if (eq computed-line
(compute-line buffer (buffer-point buffer)))
`((0 ,(length string) active-line-number-attribute))
`((0 ,(length string) line-numbers-attribute)))))
Expand Down

0 comments on commit 1c775fc

Please sign in to comment.