Hide internal commands

This commit is contained in:
Florian Bruhin 2014-01-28 06:22:09 +01:00
parent 4d2a8a7102
commit 480cf787b2
2 changed files with 6 additions and 1 deletions

View File

@ -55,6 +55,7 @@ class Print(Command):
class Scroll(Command):
nargs = 2
count = True
hide = True
class Undo(Command):
nargs = 0
@ -62,10 +63,12 @@ class Undo(Command):
class ScrollPercentX(Command):
nargs = '?'
count = True
hide = True
class ScrollPercentY(Command):
nargs = '?'
count = True
hide = True
class PyEval(Command):
nargs = 1

View File

@ -89,7 +89,8 @@ class CommandCompletionModel(CompletionModel):
assert(cmd_dict)
cmdlist = []
for obj in set(cmd_dict.values()):
cmdlist.append([obj.mainname, obj.desc])
if not obj.hide:
cmdlist.append([obj.mainname, obj.desc])
self._data['Commands'] = sorted(cmdlist)
self.init_data()
@ -109,6 +110,7 @@ class Command(QObject):
count = False
split_args = True
signal = pyqtSignal(tuple)
hide = False
desc = "" # FIXME add descriptions everywhere
def __init__(self):