Commits

Anonymous committed f244cf2

Goto definition opens out of project files in read only mode

  • Participants
  • Parent commits 1bf437d

Comments (0)

Files changed (1)

File ropemacs/__init__.py

         self._perform(generator.get_changes())
         self._goto_location(generator.get_location())
 
-    def _goto_location(self, location):
+    def _goto_location(self, location, readonly=False):
         if location[0]:
-            lisp.find_file(str(location[0].real_path))
+            resource = location[0]
+            if resource.project == self.project:
+                lisp.find_file(str(location[0].real_path))
+            else:
+                lisp.find_file_read_only(str(location[0].real_path))
         if location[1]:
             lisp.goto_line(location[1])