diff --git a/it/saved.py b/it/saved.py new file mode 100644 index 0000000..47f12d6 --- /dev/null +++ b/it/saved.py @@ -0,0 +1,15 @@ +def main(buffer, command): + if len(command) > 2: + print("?") + elif len(command) == 2: + if command[1].isdigit(): + buffer.saved = int(command[1]) + elif command[1].lower() in {"true","false"}: + buffer.saved = command[1].lower == "true" + else: + print("?") + else: + buffer.saved = not(buffer.saved) + print("Buffer marked as %sSAVED" % ("" if buffer.saved else "NOT ")) + + return buffer