Skip to content

Commit

Permalink
Ignore errors when completing
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroendehaas committed Jan 8, 2023
1 parent 3bcb52a commit e53de49
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions idris2-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,12 @@ type-correct, so loading will fail."
(let* ((start (line-beginning-position))
(end (point))
(target (buffer-substring-no-properties start end))
(result (car (idris2-eval `(:repl-completions ,target)))))
(cl-destructuring-bind (completions partial) result
(if (null completions)
nil
(list (+ start (length partial)) end completions :exclusive 'no))))))
(result (car (idris2-eval `(:repl-completions ,target) t))))
(and result
(cl-destructuring-bind (completions partial) result
(if (null completions)
nil
(list (+ start (length partial)) end completions :exclusive 'no)))))))


(defun idris2-list-holes ()
Expand Down

0 comments on commit e53de49

Please sign in to comment.