File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1046,10 +1046,13 @@ regexes from `cider-locref-regexp-alist' to infer locations at point."
1046
1046
(if-let ((loc (cider-locref-at-point pos)))
1047
1047
(let* ((var (plist-get loc :var ))
1048
1048
(line (plist-get loc :line ))
1049
- (file (if var
1050
- (or (cider-sync-request:ns-path var)
1051
- (nrepl-dict-get (cider-sync-request:info var) " file" ))
1052
- (plist-get loc :file ))))
1049
+ (file (or
1050
+ ; ; retrieve from info middleware
1051
+ (when var
1052
+ (or (cider-sync-request:ns-path var)
1053
+ (nrepl-dict-get (cider-sync-request:info var) " file" )))
1054
+ ; ; when not found, return the file detected by regexp
1055
+ (plist-get loc :file ))))
1053
1056
(if file
1054
1057
(cider--jump-to-loc-from-info (nrepl-dict " file" file " line" line))
1055
1058
(error " No source location for %s " var)))
You can’t perform that action at this time.
0 commit comments