Commits

Ali Afshar committed 30e5522 Merge

merged

  • Participants
  • Parent commits 4cb4b57, 5dbea99

Comments (0)

Files changed (2)

File pida/editors/vim/client.py

     name = get_bus_name(uid)
     session = dbus.SessionBus()
     def cb(bn):
-        if bn: #XXX: may be empty
+        if bn: # may be empty
             gtk.main_quit()
     watch = session.watch_name_owner(name, cb)
-    gtk.main()
+    gtk.main() #XXX: this might kill us if vim somehow fails
     try:
         log.debug('trying vim connect')
         return dbus.Interface(

File pida/services/language/gui.py

         self.errors_ol.clear()
 
     def on_errors_ol__selection_changed(self, ol):
-        self._last_selected = (self.document, ol.selected_item.lineno)
+        item = ol.selected_item # may be None
+        self._last_selected = (self.document, getattr(item, 'lineno', 0))
 
     def on_errors_ol__item_activated(self, ol, item):
         self.svc.boss.editor.cmd('goto_line', line=int(item.lineno))