Skip to content

Commit

Permalink
Merge branch 'stsquad-fix-regexp-overflow'
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuyk committed Jun 14, 2017
2 parents e3ae5f6 + fd35b90 commit e720e14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helm-git-grep.el
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ Argument SOURCE is not used."

(defun helm-git-grep-filtered-candidate-transformer-file-line-1 (candidate)
"Transform CANDIDATE to `helm-git-grep-mode' format."
; truncate any very long lines
(when (> (length candidate) (window-width))
(setq candidate (substring candidate 0 (window-width))))

(when (string-match "^\\(.+\\)\x00\\([0-9]+\\)\x00\\(.*\\)$" candidate)
(let ((filename (match-string 1 candidate))
(lineno (match-string 2 candidate))
Expand Down

0 comments on commit e720e14

Please sign in to comment.