1
0

works in progress

This commit is contained in:
Deven Blake 2021-05-30 17:26:03 -04:00
parent 40ef42a246
commit b0db6717ca
2 changed files with 29 additions and 0 deletions

22
it/i.py Normal file
View File

@ -0,0 +1,22 @@
def main(buffer, command):
if len(command) > 1:
print("?")
return buffer
i = ""
while len(i) < 1 or i[-1] != ".\n":
try:
i += input() + "\n"
# unintuitive behavior from ed
except KeyboardInterrupt:
print("?")
return buffer
except EOFError:
break
if buffer.dot < buffer.index:
buffer.content = i
else:
buffer.content =
buffer.dot += i.count("\n")
return buffer

7
it/p.py Normal file
View File

@ -0,0 +1,7 @@
def main(buffer, command):
if len(command) < 1 or len(command) > 2:
if buffer.dot < buffer.index:
buffer.content = i
buffer.dot += len(i)
return buffer