From 6dcd7d2040b7e74e3d3504110bcda8c6640fcfa2 Mon Sep 17 00:00:00 2001 From: "Matthew O. Smith" Date: Mon, 20 Jan 2014 10:57:12 -0700 Subject: [PATCH] gh-110 Fixed line parsing to include tabs --- src/main/lisp/malabar-flycheck.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/lisp/malabar-flycheck.el b/src/main/lisp/malabar-flycheck.el index 3503c4c..7217fe4 100644 --- a/src/main/lisp/malabar-flycheck.el +++ b/src/main/lisp/malabar-flycheck.el @@ -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))))