Skip to content

Commit

Permalink
workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jyp committed Aug 8, 2023
1 parent 914d4f2 commit ca47f8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dante.el
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,11 @@ Or nil if BUFFER / TEMP-FILE are not relevant to the message."
(t (list :error msg-start)))))
(location (dante-parse-error-location location-raw))
(r (pcase location
(`(,l1 ,c1 ,l2 ,c2) (cons (dante-pos-at-line-col buffer l1 c1) (dante-pos-at-line-col buffer (or l2 l1) (1+ c2))))
(`(,l ,c) (flymake-diag-region buffer l c)))))
(`(,l1 ,c1 ,l2 ,c2) (cons (dante-pos-at-line-col buffer l1 c1)
(dante-pos-at-line-col buffer (or l2 l1) (1+ c2))))
(`(,l ,c)
(let ((p (dante-pos-at-line-col buffer l c)))
(cons p (1+ p))))))) ;; flymake-diag-region barfs on tabs
(when r
(cl-destructuring-bind (type msg-first-line) type-analysis
(let* ((final-msg (s-trim (concat msg-first-line "\n" (replace-regexp-in-string "^ " "" msg)))))
Expand Down

0 comments on commit ca47f8c

Please sign in to comment.