Revert changes to cmdhistory.py.
This commit is contained in:
parent
4544c78395
commit
3e8136e353
@ -63,7 +63,6 @@ class History(QObject):
|
|||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.handle_private_mode = False
|
self.handle_private_mode = False
|
||||||
self._tmphist = None
|
self._tmphist = None
|
||||||
|
|
||||||
if history is None:
|
if history is None:
|
||||||
self.history = []
|
self.history = []
|
||||||
else:
|
else:
|
||||||
@ -110,7 +109,7 @@ class History(QObject):
|
|||||||
try:
|
try:
|
||||||
return self._tmphist.previtem()
|
return self._tmphist.previtem()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise HistoryEndReachedError("History end reached")
|
raise HistoryEndReachedError
|
||||||
|
|
||||||
def nextitem(self):
|
def nextitem(self):
|
||||||
"""Get the next item in the temp history.
|
"""Get the next item in the temp history.
|
||||||
@ -122,7 +121,7 @@ class History(QObject):
|
|||||||
try:
|
try:
|
||||||
return self._tmphist.nextitem()
|
return self._tmphist.nextitem()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise HistoryEndReachedError("History end reached")
|
raise HistoryEndReachedError
|
||||||
|
|
||||||
def append(self, text):
|
def append(self, text):
|
||||||
"""Append a new item to the history.
|
"""Append a new item to the history.
|
||||||
|
Loading…
Reference in New Issue
Block a user