Skip to content

Commit

Permalink
Merge pull request #810 from vwyu/correct-repl-completions
Browse files Browse the repository at this point in the history
Add unused string in completions as well.
  • Loading branch information
gracjan committed Aug 10, 2015
2 parents 3a11721 + 6fc110d commit 12a45d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions haskell-process.el
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,11 @@ Returns NIL when no completions found."
(h0 (car s1))) ;; "<limit count> <all count> <unused string>"
(unless (string-match "\\`\\([0-9]+\\) \\([0-9]+\\) \\(\".*\"\\)\\'" h0)
(error "Invalid `:complete' response"))
(let ((cnt1 (match-string 1 h0)))
(let ((cnt1 (match-string 1 h0))
(h1 (haskell-string-literal-decode (match-string 3 h0))))
(unless (= (string-to-number cnt1) (length cs))
(error "Lengths inconsistent in `:complete' reponse"))
cs)))))
(cons h1 cs))))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Accessing the process
Expand Down

0 comments on commit 12a45d1

Please sign in to comment.