Don't tabcomplete if it's impossible

This commit is contained in:
Florian Bruhin 2014-01-28 13:23:08 +01:00
parent fb84bdb55c
commit 9e24731d9a

View File

@ -148,7 +148,9 @@ class CompletionView(QTreeView):
self.ignore_next = True
self.selectionModel().setCurrentIndex(
idx, QItemSelectionModel.ClearAndSelect)
self.append_cmd_text.emit(self.model.data(idx) + ' ')
data = self.model.data(idx)
if data is not None:
self.append_cmd_text.emit(self.model.data(idx) + ' ')
def _next_idx(self, shift):
idx = self.selectionModel().currentIndex()