diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | cider-test.el | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 856bdf9e..2f783026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * [#1913](https://github.com/clojure-emacs/cider/issues/1913): Fix `cider-toggle-buffer-connection` to allow cycling of connection and restoring all connections in cljc buffers. * [#2148](https://github.com/clojure-emacs/cider/issues/2148): Fix `jump to definition` working properly when remote `cider-jack-in` and `cider-connect`. +* Font-lock failed assertions even in tests that were evaluated interactively. ### Changes diff --git a/cider-test.el b/cider-test.el index fa25ecd8..7e9def44 100644 --- a/cider-test.el +++ b/cider-test.el @@ -492,11 +492,11 @@ The optional arg TEST denotes an individual test name." (defun cider-test-highlight-problem (buffer test) "Highlight the BUFFER test definition for the non-passing TEST." (with-current-buffer buffer - (nrepl-dbind-response test (type file line message expected actual) - ;; we have to watch out for vars without proper location metadata - ;; right now everything evaluated interactively lacks this data - ;; TODO: Figure out what to do when the metadata is missing - (when (and file line (not (cider--tooling-file-p file))) + ;; we don't need the file name here, as we always operate on the current + ;; buffer and the line data is correct even for vars that were + ;; defined interactively + (nrepl-dbind-response test (type line message expected actual) + (when line (save-excursion (goto-char (point-min)) (forward-line (1- line)) |