Added memory editing functionality

This commit is contained in:
2024-11-24 18:00:27 +01:00
parent 2c820f6ead
commit b6c1a95abd
15 changed files with 688 additions and 53 deletions

View File

@@ -36,6 +36,13 @@ class WriteEntry(Entry):
self._io_buffer.write(self.content)
self.written = True
self.notify_change()
def reset(self) -> None:
"""
Reset the entry state to its initial state.
"""
self.written = False
self.notify_change()
def generate_context(self) -> ET.Element:
"""
@@ -56,4 +63,5 @@ class WriteEntry(Entry):
"type": "write",
"id": self.id,
"content": self.content,
"written": self.written,
}