Commits

Ali Gholami Rudi  committed 1f00aa0

The buffer starts from 1 in goto occurrence

  • Participants
  • Parent commits 8bafcf9

Comments (0)

Files changed (3)

File ropemacs/__init__.py

             resource = self.project.get_resource(tokens[0])
             offset = int(tokens[2])
             lisp.find_file_other_window(resource.real_path)
-            lisp.goto_char(offset)
+            lisp.goto_char(offset + 1)
             lisp.switch_to_buffer_other_window('*rope-occurrences*')
 
     @interactive

File ropemacs/lisputils.py

             thread.start()
             thread.join()
             lisp.progress_reporter_done(progress)
-            if calculate.exception is not None:
-                description = type(calculate.exception).__name__ + ': ' + \
-                                   str(calculate.exception)
+            raised = calculate.exception
+            if raised is not None:
+                description = type(raised).__name__ + ': ' + str(raised)
                 raise exceptions.InterruptedTaskError(
                     'Task <%s> was interrupted.\nReason: <%s>' %
                     (self.name, description))

File ropemacs/refactor.py

 class _Extract(Refactoring):
 
     saveall = False
-    kind = None
     optionals = {'similar': dialog.Data('Extract similar pieces: ',
                                         values=['yes', 'no'], default='yes')}
+    kind = None
     constructor = None
 
     def _create_refactoring(self):