Skip to content

Commit

Permalink
don't try to define a region that goes past the end of the buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
orzechowskid committed May 21, 2019
1 parent 29d86fd commit 55295a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion flymake-eslint.el
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ Create Flymake diag messages from contents of ESLINT-STDOUT-BUFFER, to be report
(type-symbol (if (string-equal "warning" type) :warning :error))
(src-pos (flymake-diag-region source-buffer row column)))
;; new Flymake diag message
(push (flymake-make-diagnostic source-buffer (car src-pos) (cdr src-pos) type-symbol msg-text) results)))
(push (flymake-make-diagnostic source-buffer
(car src-pos)
;; buffer might have changed size
(min (buffer-size source-buffer) (cdr src-pos))
type-symbol
msg-text)
results)))
(forward-line 1))
results))))

Expand Down

0 comments on commit 55295a0

Please sign in to comment.