Skip to content

Commit 048b157

Browse files
committed
Merge pull request #1247 from geraldus/g/disable-operator-completions
Disable interactive operator completions
2 parents e9308ce + 3f80860 commit 048b157

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

haskell-completions.el

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,16 @@ Returns nil if no completions available."
324324
(let ((prefix-data (haskell-completions-grab-prefix)))
325325
(when prefix-data
326326
(cl-destructuring-bind (beg end pfx typ) prefix-data
327-
(when (not (eql typ 'haskell-completions-general-prefix))
327+
(when (and (not (eql typ 'haskell-completions-general-prefix))
328+
;; GHCi prior to version 8.0.1 have bug in `:complete`
329+
;; command: when completing operators it returns a list of
330+
;; all imported identifiers (see Track ticket URL
331+
;; `https://ghc.haskell.org/trac/ghc/ticket/10576'). This
332+
;; leads to significant Emacs slowdown. To aviod slowdown
333+
;; operator completions are disabled for now.
334+
(not (save-excursion
335+
(goto-char (1- end))
336+
(haskell-mode--looking-at-varsym))))
328337
;; do not complete things in comments
329338
(if (cl-member
330339
typ

0 commit comments

Comments
 (0)