Commits

Anonymous committed b704d28

fixed buffer updating and renaming current module

  • Participants
  • Parent commits 1982e48

Comments (0)

Files changed (1)

ropemacs/interface.py

 
     def _reload_buffers_for_changes(self, changed_resources,
                                     moved_resources={}):
-        initial = lisp.current_buffer()
+        if self._get_resource() in moved_resources:
+            initial = None
+        else:
+            initial = lisp.current_buffer()
         for resource in changed_resources:
             buffer = lisp.find_buffer_visiting(str(resource.real_path))
             if buffer:
                     new_resource = moved_resources[resource]
                     lisp.kill_buffer(buffer)
                     lisp.find_file(new_resource.real_path)
-        lisp.set_buffer(initial)
+        if initial is not None:
+            lisp.set_buffer(initial)
 
     def _get_moved_resources(self, changes, undo=False):
         result = {}