diff --git a/src/fenrir/commands/commands/WIP/prev_clipboard.py b/src/fenrir/commands/commands/WIP/prev_clipboard.py index 9aaaeaf9..3019aec4 100644 --- a/src/fenrir/commands/commands/WIP/prev_clipboard.py +++ b/src/fenrir/commands/commands/WIP/prev_clipboard.py @@ -28,7 +28,7 @@ class command(): self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True) if isLast: self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True) - + print(isLast,isFirst) speechInterrupt = not(isLast or isFirst) self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt) diff --git a/src/fenrir/core/memoryManager.py b/src/fenrir/core/memoryManager.py index 8fd8012e..c8c1ba81 100644 --- a/src/fenrir/core/memoryManager.py +++ b/src/fenrir/core/memoryManager.py @@ -16,7 +16,6 @@ class memoryManager(): pass def listStorageValid(self,name, checkIndex = False): try: - print(self.listStorage[name]['index'], self.listStorage[name]['list']) if checkIndex: index = self.listStorage[name]['index'] if index == -1: @@ -42,7 +41,7 @@ class memoryManager(): def isLastIndex(self, name): if not self.listStorageValid(name): return False - return self.listStorage[name]['index'] == len(self.listStorage[name]['list']) + return self.listStorage[name]['index'] == len(self.listStorage[name]['list']) - 1 def isFirstIndex(self, name): if not self.listStorageValid(name): return False @@ -81,14 +80,14 @@ class memoryManager(): if self.isIndexListEmpty(name): self.listStorage[name]['index'] = -1 return 0 - return len(self.listStorage[name]['index']) + return len(self.listStorage[name]) def setLastIndex(self, name): if not self.listStorageValid(name): return False if self.isIndexListEmpty(name): self.listStorage[name]['index'] = -1 return False - self.listStorage[name]['index'] = self.listStorage[name]['list'] -1 + self.listStorage[name]['index'] = len(self.listStorage[name]['list']) -1 return True def clearCurrentIndexList(self, name): if not self.listStorageValid(name):