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."
10461046 (if-let ((loc (cider-locref-at-point pos)))
10471047 (let* ((var (plist-get loc :var ))
10481048 (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 ))))
10531056 (if file
10541057 (cider--jump-to-loc-from-info (nrepl-dict " file" file " line" line))
10551058 (error " No source location for %s " var)))
You can’t perform that action at this time.
0 commit comments