Skip to content

Commit

Permalink
Fix a couple display glitches; preserve completions
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Mar 27, 2023
1 parent a2ea314 commit 7fe7d91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion racket-pdb.el
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ this mode."
(defvar-local racket--pdb-errors-index -1)

(defun racket--pdb-reset-errors (errors)
(racket--remove-face-overlays-in-buffer racket-xp-error-face)
(let ((errors (sort errors (lambda (a b) (< (car a) (car b))))))
(dolist (e errors)
(pcase-let ((`(,beg ,end . ,_) e))
Expand Down Expand Up @@ -364,7 +365,9 @@ This is ad hoc and forensic."
(pcase response
(`((completions . ,completions)
(errors . ,errors))
(setq racket--xp-binding-completions completions) ;racket-xp-complete.el
(racket--pdb-remove-all-face-overlays)
(when completions ;if none b/c e.g. error, retain old ones
(setq racket--xp-binding-completions completions)) ;racket-xp-complete.el
(racket--pdb-reset-errors errors)
(racket--pdb-set-status (if errors 'err 'ok))
(racket--pdb-show-after-motion))))))))
Expand Down

0 comments on commit 7fe7d91

Please sign in to comment.