Skip to content

Commit

Permalink
gh-110 Handle tabs in the caret line
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew O. Smith committed Jan 20, 2014
1 parent 53f5c6d commit cfedcf1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/lisp/malabar-flycheck.el
Expand Up @@ -29,11 +29,13 @@
;; (malabar-util-expand-file-name (buffer-file-name buf))))))



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


(defun malabar-flycheck-error-line? (line)
Expand Down

0 comments on commit cfedcf1

Please sign in to comment.