Remove ignore_next
This commit is contained in:
parent
fa6f464e23
commit
df6c1fd26d
@ -53,7 +53,6 @@ class CompletionView(QTreeView):
|
|||||||
model: The currently active filter model.
|
model: The currently active filter model.
|
||||||
_STYLESHEET: The stylesheet template for the CompletionView.
|
_STYLESHEET: The stylesheet template for the CompletionView.
|
||||||
_completion_models: dict of available completion models.
|
_completion_models: dict of available completion models.
|
||||||
_ignore_next: Whether to ignore the next cmd_text_changed signal.
|
|
||||||
_enabled: Whether showing the CompletionView is enabled.
|
_enabled: Whether showing the CompletionView is enabled.
|
||||||
_completing: Whether we're currently completing something.
|
_completing: Whether we're currently completing something.
|
||||||
_height: The height to use for the CompletionView.
|
_height: The height to use for the CompletionView.
|
||||||
@ -105,7 +104,6 @@ class CompletionView(QTreeView):
|
|||||||
'command': CompletionFilterModel(CommandCompletionModel(self)),
|
'command': CompletionFilterModel(CommandCompletionModel(self)),
|
||||||
'setting': CompletionFilterModel(SettingCompletionModel(self)),
|
'setting': CompletionFilterModel(SettingCompletionModel(self)),
|
||||||
}
|
}
|
||||||
self._ignore_next = False
|
|
||||||
self._completing = False
|
self._completing = False
|
||||||
|
|
||||||
self._delegate = _CompletionItemDelegate(self)
|
self._delegate = _CompletionItemDelegate(self)
|
||||||
@ -178,11 +176,6 @@ class CompletionView(QTreeView):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
# FIXME we should also consider the cursor position
|
# FIXME we should also consider the cursor position
|
||||||
if self._ignore_next:
|
|
||||||
# Text changed by a completion, so we don't have to complete again.
|
|
||||||
self._ignore_next = False
|
|
||||||
return
|
|
||||||
|
|
||||||
if not text.startswith(':'):
|
if not text.startswith(':'):
|
||||||
# This is a search or gibberish, so we don't need to complete
|
# This is a search or gibberish, so we don't need to complete
|
||||||
# anything (yet)
|
# anything (yet)
|
||||||
@ -247,7 +240,6 @@ class CompletionView(QTreeView):
|
|||||||
idx, QItemSelectionModel.ClearAndSelect)
|
idx, QItemSelectionModel.ClearAndSelect)
|
||||||
data = self.model.data(idx)
|
data = self.model.data(idx)
|
||||||
if data is not None:
|
if data is not None:
|
||||||
self._ignore_next = True
|
|
||||||
self.append_cmd_text.emit(self.model.data(idx) + ' ')
|
self.append_cmd_text.emit(self.model.data(idx) + ' ')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user