Skip to content

Commit

Permalink
gh-110 Fixed line parsing to include tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew O. Smith committed Jan 20, 2014
1 parent 83bb083 commit 6dcd7d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/lisp/malabar-flycheck.el
Expand Up @@ -31,9 +31,9 @@

(defun malabar-flycheck-error-column (lines)
"Find the column of the error by looking for the magic caret. Expand tabs to 8 spaces."
(let* ((caret-line (-first (lambda (s) (string-match "\\( *\\^\\).*" s)) lines))
(let* ((caret-line (-first (lambda (s) (string-match "\\([\t ]*\\^\\).*" s)) lines))
(g1 (when caret-line (match-string 1 caret-line)))
(g2 (when g1 (replace-regexp-in-string "\t" " " g1))))
(g2 (when g1 (replace-regexp-in-string " " "!" g1))))
(when g2 (length g2))))


Expand Down

0 comments on commit 6dcd7d2

Please sign in to comment.