Skip to content

Commit

Permalink
better handling of rtags-set-current-project
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersbakken committed Nov 1, 2021
1 parent 1e1ee4b commit 60889dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rtags.el
Original file line number Diff line number Diff line change
@@ -1539,7 +1539,12 @@ Uses `completing-read' to ask for the project."
(format "RTags select project (current is %s): " current)
projects))
(when project
(find-file project))))
(string-match "^\\(.*\\)/ (" project)
(let ((buf (buffer-file-name))
(projectpath (match-string-no-properties 1 project)))
(unless (and (> (length buf) (length projectpath))
(string= (substring buf 0 (length projectpath)) projectpath))
(find-file projectpath))))))

(defun rtags-current-symbol (&optional no-symbol-name)
(or (and rtags-use-mark-as-current-symbol

0 comments on commit 60889dc

Please sign in to comment.