Permalink
Browse files

gh-110 Handle tabs in the caret line

  • Loading branch information...
Matthew O. Smith
Matthew O. Smith committed Jan 20, 2014
1 parent 53f5c6d commit cfedcf12ede59277fcf9bbe52b1375ddb5048778
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/main/lisp/malabar-flycheck.el
@@ -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)

0 comments on commit cfedcf1

Please sign in to comment.